mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
HackStudio: Add a factory function for HackStudioWidget
This will allow us to handle errors while creating the HackStudioWidget. (tip: check next commit :^)
This commit is contained in:
parent
61789de11d
commit
55a903911b
3 changed files with 68 additions and 63 deletions
|
@ -68,7 +68,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
project_path = path.release_value();
|
||||
}
|
||||
|
||||
auto hack_studio_widget = TRY(window->try_set_main_widget<HackStudioWidget>(project_path));
|
||||
auto hack_studio_widget = TRY(HackStudioWidget::create(project_path));
|
||||
window->set_main_widget(hack_studio_widget);
|
||||
s_hack_studio_widget = hack_studio_widget;
|
||||
|
||||
window->set_title(DeprecatedString::formatted("{} - Hack Studio", hack_studio_widget->project().name()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue