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 /Services/SystemMenu | |
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 'Services/SystemMenu')
-rw-r--r-- | Services/SystemMenu/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Services/SystemMenu/main.cpp b/Services/SystemMenu/main.cpp index 5de516eeab..02112635ee 100644 --- a/Services/SystemMenu/main.cpp +++ b/Services/SystemMenu/main.cpp @@ -65,8 +65,8 @@ static NonnullRefPtr<GUI::Menu> build_system_menu(); int main(int argc, char** argv) { - GUI::Application app(argc, argv); - app.set_quit_when_last_window_deleted(false); + auto app = GUI::Application::construct(argc, argv); + app->set_quit_when_last_window_deleted(false); auto menu = build_system_menu(); menu->realize_menu_if_needed(); @@ -95,7 +95,7 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - return app.exec(); + return app->exec(); } NonnullRefPtr<GUI::Menu> build_system_menu() |