Commit 9a3acd48 authored by hjk's avatar hjk

debugger: re-connect 'executeDebuggerCommand'

parent ecff29be
......@@ -181,6 +181,7 @@ enum ModelRoles
RequestLoadSessionDataRole,
RequestSaveSessionDataRole,
RequestOperatedByInstructionTriggeredRole,
RequestExecuteCommandRole,
// Breakpoints
BreakpointEnabledRole,
......
......@@ -173,12 +173,9 @@ private:
DebuggerEngine *m_engine;
};
bool CommandHandler::setData
(const QModelIndex &index, const QVariant &value, int role)
bool CommandHandler::setData(const QModelIndex &, const QVariant &value, int role)
{
//qDebug() << "COMMAND: " << role << value;
Q_UNUSED(index);
Q_UNUSED(value);
switch (role) {
case RequestLoadSessionDataRole:
......@@ -265,6 +262,9 @@ bool CommandHandler::setData
m_engine->gotoLocation(m_engine->stackHandler()->currentFrame(), true);
return true;
case RequestExecuteCommandRole:
m_engine->executeDebuggerCommand(value.toString());
return true;
}
return false;
......
......@@ -852,8 +852,8 @@ public slots:
void aboutToUnloadSession();
void aboutToSaveSession();
void watchPoint() { QTC_ASSERT(false, /**/); } // FIXME
void executeDebuggerCommand() { QTC_ASSERT(false, /**/); } // FIXME
void executeDebuggerCommand(QString const &) {}
void executeDebuggerCommand();
public:
DebuggerState m_state;
......@@ -2311,6 +2311,12 @@ void DebuggerPluginPrivate::exitDebugger()
m_codeModelSnapshot = CPlusPlus::Snapshot();
}
void DebuggerPluginPrivate::executeDebuggerCommand()
{
if (QAction *action = qobject_cast<QAction *>(sender()))
notifyCurrentEngine(RequestExecuteCommandRole, action->data().toString());
}
///////////////////////////////////////////////////////////////////////
//
......
Markdown is supported
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