diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-04 14:05:19 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-04 14:05:57 +0200 |
commit | 1dd15950439f4027f6412bb3748f7f433e60924b (patch) | |
tree | 9d80cf082ebb91247bc885a444d58514a4d9a8df /Applications/Help/main.cpp | |
parent | 0d577ab7815f6ccdba7d85d94ae8cc80d96ea5ea (diff) | |
download | serenity-1dd15950439f4027f6412bb3748f7f433e60924b.zip |
LibGUI: Make GUI::Application a Core::Object
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
Diffstat (limited to 'Applications/Help/main.cpp')
-rw-r--r-- | Applications/Help/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp index 64ec6417c8..87824d0947 100644 --- a/Applications/Help/main.cpp +++ b/Applications/Help/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) return 1; } - GUI::Application app(argc, argv); + auto app = GUI::Application::construct(argc, argv); if (pledge("stdio shared_buffer accept rpath", nullptr) < 0) { perror("pledge"); @@ -201,12 +201,12 @@ int main(int argc, char* argv[]) go_menu.add_action(*go_back_action); go_menu.add_action(*go_forward_action); - app.set_menubar(move(menubar)); + app->set_menubar(move(menubar)); window->set_focused_widget(&tree_view); window->show(); window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png")); - return app.exec(); + return app->exec(); } |