forked from qt-creator/qt-creator
Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into a bool canHandleToolTip(), and the actual processing of the request, which is mostly identical to the handling of a watcher. Handling a watcher is now mostly the same as a full Locals update, except for the 'partial' flag. Pushing the handling of that down to the bridges gives identical code paths in the gdb and lldbengine. Move that to the DebuggerEngine base class. Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -973,12 +973,11 @@ void QmlEngine::requestModuleSymbols(const QString &moduleName)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool QmlEngine::setToolTipExpression(const DebuggerToolTipContext &context)
|
||||
bool QmlEngine::canHandleToolTip(const DebuggerToolTipContext &) const
|
||||
{
|
||||
// This is processed by QML inspector, which has dependencies to
|
||||
// the qml js editor. Makes life easier.
|
||||
// FIXME: Except that there isn't any attached.
|
||||
emit tooltipRequested(context);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -999,11 +998,12 @@ void QmlEngine::assignValueInDebugger(WatchItem *item,
|
||||
}
|
||||
}
|
||||
|
||||
void QmlEngine::updateWatchItem(WatchItem *item)
|
||||
void QmlEngine::updateWatchData(const QByteArray &iname)
|
||||
{
|
||||
// qDebug() << "UPDATE WATCH DATA" << data.toString();
|
||||
//showStatusMessage(tr("Stopped."), 5000);
|
||||
|
||||
const WatchItem *item = watchHandler()->findItem(iname);
|
||||
QTC_ASSERT(item, return);
|
||||
if (item->isInspect()) {
|
||||
m_inspectorAdapter.agent()->updateWatchData(*item);
|
||||
} else {
|
||||
@@ -1018,7 +1018,7 @@ void QmlEngine::updateWatchItem(WatchItem *item)
|
||||
}
|
||||
}
|
||||
|
||||
void QmlEngine::watchDataSelected(const QByteArray &iname)
|
||||
void QmlEngine::selectWatchData(const QByteArray &iname)
|
||||
{
|
||||
const WatchItem *item = watchHandler()->findItem(iname);
|
||||
if (item && item->isInspect())
|
||||
|
||||
Reference in New Issue
Block a user