Commit 9a3acd48 authored by hjk's avatar hjk
Browse files

debugger: re-connect 'executeDebuggerCommand'

parent ecff29be
...@@ -181,6 +181,7 @@ enum ModelRoles ...@@ -181,6 +181,7 @@ enum ModelRoles
RequestLoadSessionDataRole, RequestLoadSessionDataRole,
RequestSaveSessionDataRole, RequestSaveSessionDataRole,
RequestOperatedByInstructionTriggeredRole, RequestOperatedByInstructionTriggeredRole,
RequestExecuteCommandRole,
// Breakpoints // Breakpoints
BreakpointEnabledRole, BreakpointEnabledRole,
......
...@@ -173,12 +173,9 @@ private: ...@@ -173,12 +173,9 @@ private:
DebuggerEngine *m_engine; DebuggerEngine *m_engine;
}; };
bool CommandHandler::setData bool CommandHandler::setData(const QModelIndex &, const QVariant &value, int role)
(const QModelIndex &index, const QVariant &value, int role)
{ {
//qDebug() << "COMMAND: " << role << value; //qDebug() << "COMMAND: " << role << value;
Q_UNUSED(index);
Q_UNUSED(value);
switch (role) { switch (role) {
case RequestLoadSessionDataRole: case RequestLoadSessionDataRole:
...@@ -265,6 +262,9 @@ bool CommandHandler::setData ...@@ -265,6 +262,9 @@ bool CommandHandler::setData
m_engine->gotoLocation(m_engine->stackHandler()->currentFrame(), true); m_engine->gotoLocation(m_engine->stackHandler()->currentFrame(), true);
return true; return true;
case RequestExecuteCommandRole:
m_engine->executeDebuggerCommand(value.toString());
return true;
} }
return false; return false;
......
...@@ -852,8 +852,8 @@ public slots: ...@@ -852,8 +852,8 @@ public slots:
void aboutToUnloadSession(); void aboutToUnloadSession();
void aboutToSaveSession(); void aboutToSaveSession();
void watchPoint() { QTC_ASSERT(false, /**/); } // FIXME void watchPoint() { QTC_ASSERT(false, /**/); } // FIXME
void executeDebuggerCommand() { QTC_ASSERT(false, /**/); } // FIXME
void executeDebuggerCommand(QString const &) {} void executeDebuggerCommand();
public: public:
DebuggerState m_state; DebuggerState m_state;
...@@ -2311,6 +2311,12 @@ void DebuggerPluginPrivate::exitDebugger() ...@@ -2311,6 +2311,12 @@ void DebuggerPluginPrivate::exitDebugger()
m_codeModelSnapshot = CPlusPlus::Snapshot(); m_codeModelSnapshot = CPlusPlus::Snapshot();
} }
void DebuggerPluginPrivate::executeDebuggerCommand()
{
if (QAction *action = qobject_cast<QAction *>(sender()))
notifyCurrentEngine(RequestExecuteCommandRole, action->data().toString());
}
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
// //
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment