1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:07:35 +00:00

LibGUI: Move GUI::SettingsWindow setup out of the constructor

In order to propagate errors that occur during UI setup, we have to move
all that logic out of widget/window subclass constructors. This is a
first attempt at doing that, for GUI::SettingsWindow.
This commit is contained in:
Andreas Kling 2021-11-28 08:34:04 +01:00
parent 56c4f0aff5
commit 60c132d7d3
8 changed files with 48 additions and 38 deletions

View file

@ -29,6 +29,8 @@ public:
No,
};
static ErrorOr<NonnullRefPtr<SettingsWindow>> create(String title, ShowDefaultsButton = ShowDefaultsButton::No);
virtual ~SettingsWindow() override;
template<class T, class... Args>
@ -40,7 +42,7 @@ public:
}
private:
SettingsWindow(StringView title, ShowDefaultsButton = ShowDefaultsButton::No);
SettingsWindow();
RefPtr<GUI::TabWidget> m_tab_widget;
NonnullRefPtrVector<Tab> m_tabs;