diff options
author | hjk <[email protected]> | 2020-03-24 14:40:54 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2020-03-25 08:51:36 +0000 |
commit | 699407b4ba2fbea1a98e4add3763fd6e205cde99 (patch) | |
tree | 2984a6fc9f803d066c1acbaece12394ff154aa46 | |
parent | 41fb7e5855fb07b9c9c35b84b0bd239155e00f46 (diff) |
Debugger: Create central widget earlierv4.11.2
This ensures the showCentralWidget() call in restorePersistentSettings()
has something to operate on.
Change-Id: I52e676517cad4e7c3c0e7ca80b8756f937c805a0
Fixes: QTCREATORBUG-23755
Reviewed-by: David Schulz <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
-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 ce01d5a5a9e..7e6028d9353 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -297,6 +297,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 cdbe82a7a57..6046d5be962 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -496,7 +496,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); @@ -525,7 +525,6 @@ public: splitter->setStretchFactor(1, 1); splitter->setObjectName("DebugModeWidget"); - mainWindow->setCentralWidget(centralEditorWidget); mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser()); setWidget(splitter); |