forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -2288,6 +2288,12 @@ void DebuggerEngine::openDisassemblerView(const Location &location)
|
|||||||
void DebuggerEngine::raiseWatchersWindow()
|
void DebuggerEngine::raiseWatchersWindow()
|
||||||
{
|
{
|
||||||
if (d->m_watchersView && d->m_watchersWindow) {
|
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 (auto dock = qobject_cast<QDockWidget *>(d->m_watchersWindow->parentWidget())) {
|
||||||
if (QAction *act = dock->toggleViewAction()) {
|
if (QAction *act = dock->toggleViewAction()) {
|
||||||
if (!act->isChecked())
|
if (!act->isChecked())
|
||||||
|
Reference in New Issue
Block a user