mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
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.
This commit is contained in:
parent
0d577ab781
commit
1dd1595043
51 changed files with 140 additions and 138 deletions
|
@ -44,7 +44,7 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
GUI::Application app(argc, argv);
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
auto audio_client = Audio::ClientConnection::construct();
|
||||
audio_client->handshake();
|
||||
|
@ -120,7 +120,7 @@ int main(int argc, char** argv)
|
|||
auto& edit_menu = menubar->add_menu("Edit");
|
||||
main_widget.add_actions(edit_menu);
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
return app.exec();
|
||||
return app->exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue