From 32d9af894fe5e4b5e572665e1454524a02bac684 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 3 Feb 2020 10:22:57 +0100 Subject: Debugger: Do not raise watchers window unconditionally In case of mixed debugging it may happen that the trigger for add an expression happens on a different debugger engine than the raise of the watchers window as the companion engine might have been interrupted and the current perspective has changed accordingly. Avoid raising the watchers window for the other engine in that case. Fixes: QTCREATORBUG-23545 Change-Id: Ic3472b17c727f1336afd1945b5bc448e75e25b4f Reviewed-by: hjk --- src/plugins/debugger/debuggerengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 86d4834b65..01c66fa95b 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -2288,6 +2288,12 @@ void DebuggerEngine::openDisassemblerView(const Location &location) void DebuggerEngine::raiseWatchersWindow() { if (d->m_watchersView && d->m_watchersWindow) { + auto currentPerspective = DebuggerMainWindow::currentPerspective(); + QTC_ASSERT(currentPerspective, return); + // if a companion engine has taken over - do not raise the watchers + if (currentPerspective->name() != d->m_engine->displayName()) + return; + if (auto dock = qobject_cast(d->m_watchersWindow->parentWidget())) { if (QAction *act = dock->toggleViewAction()) { if (!act->isChecked()) -- cgit v1.2.3