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 /MenuApplets | |
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 'MenuApplets')
-rw-r--r-- | MenuApplets/Audio/main.cpp | 4 | ||||
-rw-r--r-- | MenuApplets/ClipboardHistory/main.cpp | 4 | ||||
-rw-r--r-- | MenuApplets/Clock/main.cpp | 4 | ||||
-rw-r--r-- | MenuApplets/ResourceGraph/main.cpp | 4 | ||||
-rw-r--r-- | MenuApplets/UserName/main.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/MenuApplets/Audio/main.cpp b/MenuApplets/Audio/main.cpp index c90a4adc6e..df6f859e41 100644 --- a/MenuApplets/Audio/main.cpp +++ b/MenuApplets/Audio/main.cpp @@ -81,7 +81,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 unix", nullptr) < 0) { perror("pledge"); @@ -109,5 +109,5 @@ int main(int argc, char** argv) return 1; } - return app.exec(); + return app->exec(); } diff --git a/MenuApplets/ClipboardHistory/main.cpp b/MenuApplets/ClipboardHistory/main.cpp index fcd1fb5fab..63173171bd 100644 --- a/MenuApplets/ClipboardHistory/main.cpp +++ b/MenuApplets/ClipboardHistory/main.cpp @@ -38,7 +38,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"); @@ -85,5 +85,5 @@ int main(int argc, char* argv[]) applet_window->resize(16, 16); applet_window->show(); - return app.exec(); + return app->exec(); } diff --git a/MenuApplets/Clock/main.cpp b/MenuApplets/Clock/main.cpp index 26a8afaa92..e187ef6583 100644 --- a/MenuApplets/Clock/main.cpp +++ b/MenuApplets/Clock/main.cpp @@ -110,7 +110,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 exec proc", nullptr) < 0) { perror("pledge"); @@ -137,5 +137,5 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - return app.exec(); + return app->exec(); } diff --git a/MenuApplets/ResourceGraph/main.cpp b/MenuApplets/ResourceGraph/main.cpp index 775c50a940..426fef924c 100644 --- a/MenuApplets/ResourceGraph/main.cpp +++ b/MenuApplets/ResourceGraph/main.cpp @@ -159,7 +159,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 proc exec rpath", nullptr) < 0) { perror("pledge"); @@ -235,5 +235,5 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - return app.exec(); + return app->exec(); } diff --git a/MenuApplets/UserName/main.cpp b/MenuApplets/UserName/main.cpp index 9eb84aefb4..345cc6c6ed 100644 --- a/MenuApplets/UserName/main.cpp +++ b/MenuApplets/UserName/main.cpp @@ -86,7 +86,7 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - GUI::Application app(argc, argv); + auto app = GUI::Application::construct(argc, argv); auto window = GUI::Window::construct(); window->set_title("UserName"); @@ -101,5 +101,5 @@ int main(int argc, char** argv) return 1; } - return app.exec(); + return app->exec(); } |