forked from qt-creator/qt-creator
Debugger: Create central widget earlier
This ensures the showCentralWidget() call in restorePersistentSettings() has something to operate on. Change-Id: I52e676517cad4e7c3c0e7ca80b8756f937c805a0 Fixes: QTCREATORBUG-23755 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -297,6 +297,11 @@ DebuggerMainWindow::DebuggerMainWindow()
|
|||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
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();
|
restorePersistentSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -496,7 +496,7 @@ public:
|
|||||||
documentAndRightPane->setStretchFactor(0, 1);
|
documentAndRightPane->setStretchFactor(0, 1);
|
||||||
documentAndRightPane->setStretchFactor(1, 0);
|
documentAndRightPane->setStretchFactor(1, 0);
|
||||||
|
|
||||||
auto centralEditorWidget = new QWidget;
|
auto centralEditorWidget = mainWindow->centralWidget();
|
||||||
auto centralLayout = new QVBoxLayout(centralEditorWidget);
|
auto centralLayout = new QVBoxLayout(centralEditorWidget);
|
||||||
centralEditorWidget->setLayout(centralLayout);
|
centralEditorWidget->setLayout(centralLayout);
|
||||||
centralLayout->setContentsMargins(0, 0, 0, 0);
|
centralLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
@@ -525,7 +525,6 @@ public:
|
|||||||
splitter->setStretchFactor(1, 1);
|
splitter->setStretchFactor(1, 1);
|
||||||
splitter->setObjectName("DebugModeWidget");
|
splitter->setObjectName("DebugModeWidget");
|
||||||
|
|
||||||
mainWindow->setCentralWidget(centralEditorWidget);
|
|
||||||
mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser());
|
mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser());
|
||||||
|
|
||||||
setWidget(splitter);
|
setWidget(splitter);
|
||||||
|
Reference in New Issue
Block a user