forked from qt-creator/qt-creator
Debugger: Allow re-evaluation of certain expressions without stepping
There are cases like changing an Evaluated Expression that make re-evaluation necessary. Change-Id: I51fe46b67399a59aebbdeb9c3e778795b1c52cf1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2043,6 +2043,15 @@ void DebuggerEngine::updateItem(const QByteArray &iname)
|
|||||||
doUpdateLocals(params);
|
doUpdateLocals(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerEngine::updateWatchData(const QByteArray &iname)
|
||||||
|
{
|
||||||
|
// This is used in cases where re-evaluation is ok for the same iname
|
||||||
|
// e.g. when changing the expression in a watcher.
|
||||||
|
UpdateParameters params;
|
||||||
|
params.partialVariable = iname;
|
||||||
|
doUpdateLocals(params);
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerEngine::expandItem(const QByteArray &iname)
|
void DebuggerEngine::expandItem(const QByteArray &iname)
|
||||||
{
|
{
|
||||||
updateItem(iname);
|
updateItem(iname);
|
||||||
|
@@ -197,6 +197,7 @@ public:
|
|||||||
virtual bool canHandleToolTip(const DebuggerToolTipContext &) const;
|
virtual bool canHandleToolTip(const DebuggerToolTipContext &) const;
|
||||||
virtual void expandItem(const QByteArray &iname); // Called when item in tree gets expanded.
|
virtual void expandItem(const QByteArray &iname); // Called when item in tree gets expanded.
|
||||||
virtual void updateItem(const QByteArray &iname); // Called for fresh watch items.
|
virtual void updateItem(const QByteArray &iname); // Called for fresh watch items.
|
||||||
|
void updateWatchData(const QByteArray &iname); // FIXME: Merge with above.
|
||||||
virtual void selectWatchData(const QByteArray &iname);
|
virtual void selectWatchData(const QByteArray &iname);
|
||||||
|
|
||||||
virtual void startDebugger(DebuggerRunControl *runControl);
|
virtual void startDebugger(DebuggerRunControl *runControl);
|
||||||
|
@@ -1445,7 +1445,7 @@ void WatchHandler::watchExpression(const QString &exp0, const QString &name)
|
|||||||
item->setValue(QString(QLatin1Char(' ')));
|
item->setValue(QString(QLatin1Char(' ')));
|
||||||
item->update();
|
item->update();
|
||||||
} else {
|
} else {
|
||||||
m_model->m_engine->updateItem(item->iname);
|
m_model->m_engine->updateWatchData(item->iname);
|
||||||
}
|
}
|
||||||
updateWatchersWindow();
|
updateWatchersWindow();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user