Commit c7ea05fff71e6979f5aaa7430c3cf15b9d7466ed
- Diff rendering mode:
- inline
- side by side
src/plugins/debugger/debuggeragents.cpp
(17 / 7)
|   | |||
| 44 | 44 | #include <utils/qtcassert.h> | |
| 45 | 45 | ||
| 46 | 46 | #include <QtCore/QDebug> | |
| 47 | |||
| 48 | #include <QtGui/QMessageBox> | ||
| 47 | 49 | #include <QtGui/QPlainTextEdit> | |
| 48 | 50 | #include <QtGui/QTextCursor> | |
| 49 | 51 | #include <QtGui/QSyntaxHighlighter> | |
| … | … | ||
| 70 | 70 | */ | |
| 71 | 71 | ||
| 72 | 72 | MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr) | |
| 73 | : QObject(manager), m_engine(manager->currentEngine()) | ||
| 73 | : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) | ||
| 74 | 74 | { | |
| 75 | 75 | init(addr); | |
| 76 | 76 | } | |
| 77 | 77 | ||
| 78 | 78 | MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr) | |
| 79 | : QObject(manager), m_engine(manager->currentEngine()) | ||
| 79 | : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) | ||
| 80 | 80 | { | |
| 81 | 81 | bool ok = true; | |
| 82 | 82 | init(addr.toULongLong(&ok, 0)); | |
| … | … | ||
| 96 | 96 | m_editor = editorManager->openEditorWithContents( | |
| 97 | 97 | Core::Constants::K_DEFAULT_BINARY_EDITOR, | |
| 98 | 98 | &titlePattern); | |
| 99 | connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)), | ||
| 100 | this, SLOT(fetchLazyData(quint64,bool))); | ||
| 101 | editorManager->activateEditor(m_editor); | ||
| 102 | QMetaObject::invokeMethod(m_editor->widget(), "setLazyData", | ||
| 103 | Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize)); | ||
| 99 | if (m_editor) { | ||
| 100 | connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)), | ||
| 101 | this, SLOT(fetchLazyData(quint64,bool))); | ||
| 102 | editorManager->activateEditor(m_editor); | ||
| 103 | QMetaObject::invokeMethod(m_editor->widget(), "setLazyData", | ||
| 104 | Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize)); | ||
| 105 | } else { | ||
| 106 | m_manager->showMessageBox(QMessageBox::Warning, | ||
| 107 | tr("No memory viewer available"), | ||
| 108 | tr("The memory contents cannot be shown as no viewer plugin not " | ||
| 109 | "the BinEditor plugin could be loaded.")); | ||
| 110 | deleteLater(); | ||
| 111 | } | ||
| 104 | 112 | } | |
| 105 | 113 | ||
| 106 | 114 | void MemoryViewAgent::fetchLazyData(quint64 block, bool sync) |
src/plugins/debugger/debuggeragents.h
(1 / 0)
|   | |||
| 70 | 70 | ||
| 71 | 71 | QPointer<IDebuggerEngine> m_engine; | |
| 72 | 72 | QPointer<Core::IEditor> m_editor; | |
| 73 | QPointer<DebuggerManager> m_manager; | ||
| 73 | 74 | }; | |
| 74 | 75 | ||
| 75 | 76 |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

