1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 20:55:08 +00:00

LibGUI: Don't create GMessageBox and GInputBox on the stack

We need to get rid of all instances of widgets-on-the-stack since that
will no longer work in the ref-counting world.
This commit is contained in:
Andreas Kling 2019-09-21 20:32:31 +02:00
parent defafd72bc
commit 31b38ed88f
7 changed files with 30 additions and 33 deletions

View file

@ -29,8 +29,7 @@ int run_shutdown_dialog(int argc, char** argv)
GApplication app(argc, argv);
{
GMessageBox box("Shut down Serenity?", "Confirm Shutdown", GMessageBox::Type::Warning, GMessageBox::InputType::OKCancel);
auto result = box.exec();
auto result = GMessageBox::show("Shut down Serenity?", "Confirm Shutdown", GMessageBox::Type::Warning, GMessageBox::InputType::OKCancel);
if (result == GMessageBox::ExecOK) {
dbg() << "OK";