Merge pull request #8618 from encounter/debugger-floating-fix

DolphinQt/Debugger: Fix crash with floating debugger windows
This commit is contained in:
Léo Lam 2020-02-09 15:50:47 +01:00 committed by GitHub
commit aa21fe17b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -31,6 +31,8 @@ BreakpointWidget::BreakpointWidget(QWidget* parent) : QDockWidget(parent)
setAllowedAreas(Qt::AllDockWidgetAreas);
CreateWidgets();
auto& settings = Settings::GetQSettings();
restoreGeometry(settings.value(QStringLiteral("breakpointwidget/geometry")).toByteArray());
@ -38,8 +40,6 @@ BreakpointWidget::BreakpointWidget(QWidget* parent) : QDockWidget(parent)
// according to Settings
setFloating(settings.value(QStringLiteral("breakpointwidget/floating")).toBool());
CreateWidgets();
connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this](Core::State state) {
UpdateButtonsEnabled();
if (state == Core::State::Uninitialized)

View File

@ -34,6 +34,8 @@ CodeWidget::CodeWidget(QWidget* parent) : QDockWidget(parent)
setAllowedAreas(Qt::AllDockWidgetAreas);
CreateWidgets();
auto& settings = Settings::GetQSettings();
restoreGeometry(settings.value(QStringLiteral("codewidget/geometry")).toByteArray());
@ -57,7 +59,6 @@ CodeWidget::CodeWidget(QWidget* parent) : QDockWidget(parent)
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &CodeWidget::Update);
CreateWidgets();
ConnectWidgets();
m_code_splitter->restoreState(

View File

@ -27,6 +27,8 @@ RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)
setAllowedAreas(Qt::AllDockWidgetAreas);
CreateWidgets();
auto& settings = Settings::GetQSettings();
restoreGeometry(settings.value(QStringLiteral("registerwidget/geometry")).toByteArray());
@ -34,7 +36,6 @@ RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)
// according to Settings
setFloating(settings.value(QStringLiteral("registerwidget/floating")).toBool());
CreateWidgets();
PopulateTable();
ConnectWidgets();

View File

@ -32,6 +32,8 @@ WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)
setAllowedAreas(Qt::AllDockWidgetAreas);
CreateWidgets();
auto& settings = Settings::GetQSettings();
restoreGeometry(settings.value(QStringLiteral("watchwidget/geometry")).toByteArray());
@ -39,7 +41,6 @@ WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)
// according to Settings
setFloating(settings.value(QStringLiteral("watchwidget/floating")).toBool());
CreateWidgets();
ConnectWidgets();
connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this](Core::State state) {