summaryrefslogtreecommitdiff
path: root/MenuApplets
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-04 14:05:19 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-04 14:05:57 +0200
commit1dd15950439f4027f6412bb3748f7f433e60924b (patch)
tree9d80cf082ebb91247bc885a444d58514a4d9a8df /MenuApplets
parent0d577ab7815f6ccdba7d85d94ae8cc80d96ea5ea (diff)
downloadserenity-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.cpp4
-rw-r--r--MenuApplets/ClipboardHistory/main.cpp4
-rw-r--r--MenuApplets/Clock/main.cpp4
-rw-r--r--MenuApplets/ResourceGraph/main.cpp4
-rw-r--r--MenuApplets/UserName/main.cpp4
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();
}