summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-04-03 15:56:36 +0200
committerEike Ziller <eike.ziller@qt.io>2020-04-03 15:56:36 +0200
commitf8ec649c994c4932c83426750ffb165f34989c3b (patch)
tree47aff22f4c0ffa739e379bcce1a3e62dc865f94c /src/plugins/debugger
parent8f8b1b3d9d605458312097f68169c882e35cfad3 (diff)
parente986bdc7a7a78d09495d1d15bb09a7d1203a7027 (diff)
downloadqt-creator-f8ec649c994c4932c83426750ffb165f34989c3b.tar.gz
Merge remote-tracking branch 'origin/4.11' into 4.12
Change-Id: I3edd6457620e6c2686e13d1030805294d7d3958f
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp5
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index bdba4afb86..ed33870ed5 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -302,6 +302,11 @@ DebuggerMainWindow::DebuggerMainWindow()
cmd->setAttribute(Command::CA_Hide);
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
+ // HACK: See QTCREATORBUG-23755. This ensures the showCentralWidget()
+ // call in restorePersistentSettings() below has something to operate on,
+ // and a plain QWidget is what we'll use anyway as central widget.
+ setCentralWidget(new QWidget);
+
restorePersistentSettings();
}
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 73c8a2ade8..cc7c1fba25 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -515,7 +515,7 @@ public:
documentAndRightPane->setStretchFactor(0, 1);
documentAndRightPane->setStretchFactor(1, 0);
- auto centralEditorWidget = new QWidget;
+ auto centralEditorWidget = mainWindow->centralWidget();
auto centralLayout = new QVBoxLayout(centralEditorWidget);
centralEditorWidget->setLayout(centralLayout);
centralLayout->setContentsMargins(0, 0, 0, 0);
@@ -544,7 +544,6 @@ public:
splitter->setStretchFactor(1, 1);
splitter->setObjectName("DebugModeWidget");
- mainWindow->setCentralWidget(centralEditorWidget);
mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser());
setWidget(splitter);