Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8618 from encounter/debugger-floating-fix
DolphinQt/Debugger: Fix crash with floating debugger windows
  • Loading branch information
leoetlino committed Feb 9, 2020
2 parents 166e86b + 3e94366 commit aa21fe1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
Expand Up @@ -31,15 +31,15 @@ BreakpointWidget::BreakpointWidget(QWidget* parent) : QDockWidget(parent)

setAllowedAreas(Qt::AllDockWidgetAreas);

CreateWidgets();

auto& settings = Settings::GetQSettings();

restoreGeometry(settings.value(QStringLiteral("breakpointwidget/geometry")).toByteArray());
// macOS: setHidden() needs to be evaluated before setFloating() for proper window presentation
// 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)
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/Debugger/CodeWidget.cpp
Expand Up @@ -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());
Expand All @@ -57,7 +59,6 @@ CodeWidget::CodeWidget(QWidget* parent) : QDockWidget(parent)

connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &CodeWidget::Update);

CreateWidgets();
ConnectWidgets();

m_code_splitter->restoreState(
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/Debugger/RegisterWidget.cpp
Expand Up @@ -27,14 +27,15 @@ RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)

setAllowedAreas(Qt::AllDockWidgetAreas);

CreateWidgets();

auto& settings = Settings::GetQSettings();

restoreGeometry(settings.value(QStringLiteral("registerwidget/geometry")).toByteArray());
// macOS: setHidden() needs to be evaluated before setFloating() for proper window presentation
// according to Settings
setFloating(settings.value(QStringLiteral("registerwidget/floating")).toBool());

CreateWidgets();
PopulateTable();
ConnectWidgets();

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/Debugger/WatchWidget.cpp
Expand Up @@ -32,14 +32,15 @@ WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)

setAllowedAreas(Qt::AllDockWidgetAreas);

CreateWidgets();

auto& settings = Settings::GetQSettings();

restoreGeometry(settings.value(QStringLiteral("watchwidget/geometry")).toByteArray());
// macOS: setHidden() needs to be evaluated before setFloating() for proper window presentation
// according to Settings
setFloating(settings.value(QStringLiteral("watchwidget/floating")).toBool());

CreateWidgets();
ConnectWidgets();

connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this](Core::State state) {
Expand Down

0 comments on commit aa21fe1

Please sign in to comment.