diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 15d82c3436b..5afd9da1a1b 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -1217,7 +1217,7 @@ void CdbEngine::activateFrame(int index) void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters) { if (m_pythonVersion > 0x030000) { - watchHandler()->notifyUpdateStarted(updateParameters.partialVariables()); + watchHandler()->notifyUpdateStarted(updateParameters); DebuggerCommand cmd("theDumper.fetchVariables", ScriptCommand); watchHandler()->appendFormatRequests(&cmd); @@ -1270,7 +1270,7 @@ void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters) return; } - watchHandler()->notifyUpdateStarted(updateParameters.partialVariables()); + watchHandler()->notifyUpdateStarted(updateParameters); /* Watchers: Forcibly discard old symbol group as switching from * thread 0/frame 0 -> thread 1/assembly -> thread 0/frame 0 will otherwise re-use it diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index b91130a034d..9f196c98959 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -2061,7 +2061,7 @@ void DebuggerEngine::updateItem(const QString &iname) WatchModelBase *model = handler->model(); QTC_CHECK(model); if (item && !model->hasChildren(model->indexForItem(item))) { - handler->notifyUpdateStarted({iname}); + handler->notifyUpdateStarted(UpdateParameters(iname)); item->setValue(decodeData({}, "notaccessible")); item->setHasChildren(false); item->outdated = false; diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index e2dfd41d32b..770d079c445 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -122,7 +122,8 @@ public: class UpdateParameters { public: - UpdateParameters() {} + UpdateParameters(const QString &partialVariable = QString()) : + partialVariable(partialVariable) {} QStringList partialVariables() const { diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index cdcdb13c55c..53f94c4f6b3 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4493,7 +4493,7 @@ void GdbEngine::doUpdateLocals(const UpdateParameters ¶ms) { m_pendingBreakpointRequests = 0; - watchHandler()->notifyUpdateStarted(params.partialVariables()); + watchHandler()->notifyUpdateStarted(params); DebuggerCommand cmd("fetchVariables", Discardable|InUpdateLocals|PythonCommand); watchHandler()->appendFormatRequests(&cmd); diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 0b79fdbb0aa..eba04d0ca16 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -796,7 +796,7 @@ void LldbEngine::assignValueInDebugger(WatchItem *, void LldbEngine::doUpdateLocals(const UpdateParameters ¶ms) { - watchHandler()->notifyUpdateStarted(params.partialVariables()); + watchHandler()->notifyUpdateStarted(params); DebuggerCommand cmd("fetchVariables"); watchHandler()->appendFormatRequests(&cmd); diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 638f97f35af..83f3fed071a 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -2156,7 +2156,7 @@ void QmlEnginePrivate::handleFrame(const QVariantMap &response) StackHandler *stackHandler = engine->stackHandler(); WatchHandler * watchHandler = engine->watchHandler(); - watchHandler->notifyUpdateStarted({"local"}); + watchHandler->notifyUpdateStarted(); const int frameIndex = stackHandler->currentIndex(); if (frameIndex < 0) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 1b47b7cf950..e965ba9fedc 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1999,8 +1999,12 @@ void WatchHandler::resetWatchers() loadSessionData(); } -void WatchHandler::notifyUpdateStarted(const QStringList &inames) +void WatchHandler::notifyUpdateStarted(const UpdateParameters &updateParameters) { + QStringList inames = updateParameters.partialVariables(); + if (inames.isEmpty()) + inames.append("local"); + auto marker = [](WatchItem *item) { item->outdated = true; }; if (inames.isEmpty()) { diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index cf62cf2aede..e47fa012fdb 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -26,6 +26,7 @@ #pragma once #include "watchdata.h" +#include "debuggerengine.h" #include @@ -111,7 +112,7 @@ public: void resetValueCache(); void resetWatchers(); - void notifyUpdateStarted(const QStringList &inames = {}); + void notifyUpdateStarted(const UpdateParameters &updateParameters = UpdateParameters()); void notifyUpdateFinished(); void reexpandItems();