mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +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,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app_icon = GUI::Icon::default_icon("app-keyboard-settings");
|
||||
|
||||
auto window = TRY(GUI::SettingsWindow::try_create("Keyboard Settings"));
|
||||
auto window = TRY(GUI::SettingsWindow::create("Keyboard Settings"));
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
TRY(window->add_tab<KeyboardSettingsWidget>("Keyboard"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue