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:
parent
56c4f0aff5
commit
60c132d7d3
8 changed files with 48 additions and 38 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue