summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-02-03 10:22:57 +0100
committerChristian Stenger <christian.stenger@qt.io>2020-02-04 05:40:22 +0000
commit32d9af894fe5e4b5e572665e1454524a02bac684 (patch)
treefc4e1269a9a7219133daf1bbf30ce636577e2d6f
parent07e38c54360bfb0cb05d0df3de61340b2eb48369 (diff)
downloadqt-creator-32d9af894fe5e4b5e572665e1454524a02bac684.tar.gz
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 <hjk@qt.io>
-rw-r--r--src/plugins/debugger/debuggerengine.cpp6
1 files changed, 6 insertions, 0 deletions
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<QDockWidget *>(d->m_watchersWindow->parentWidget())) {
if (QAction *act = dock->toggleViewAction()) {
if (!act->isChecked())