Qml Debugger: Do not focus the current frame when adding a watch

The other debuggers do not cause the view to jump to the current frame
when adding a watch. Make the Qml debugger also not do this.

This is done in a slightly hacky way by preventing the gotoLocation of
the next handleFrame call to be executed. Ideally, the logic to
retrieve the value of locals should be separated from the logic to jump
to a specific frame. Right now the jump is implicit when updating the
locals.

Fixes: QTCREATORBUG-29329
Change-Id: I4b8f5c99ae41c92c3394f86da481303d4765f897
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Olivier De Cannière
2023-11-09 10:37:34 +01:00
parent 2f7bfd3ef8
commit 08546615f2
3 changed files with 12 additions and 6 deletions

View File

@@ -2411,6 +2411,7 @@ void DebuggerEngine::updateWatchData(const QString &iname)
// e.g. when changing the expression in a watcher.
UpdateParameters params;
params.partialVariable = iname;
params.qmlFocusOnFrame = false;
doUpdateLocals(params);
}