diff options
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/debuggermainwindow.cpp | 5 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 3 |
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); |