1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 00:04:58 +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

@ -4,10 +4,10 @@
#include <LibGUI/GMessageBox.h>
#include <stdio.h>
void GMessageBox::show(const StringView& text, const StringView& title, Type type, InputType input_type, CObject* parent)
int GMessageBox::show(const StringView& text, const StringView& title, Type type, InputType input_type, CObject* parent)
{
GMessageBox box(text, title, type, input_type, parent);
box.exec();
auto box = GMessageBox::construct(text, title, type, input_type, parent);
return box->exec();
}
GMessageBox::GMessageBox(const StringView& text, const StringView& title, Type type, InputType input_type, CObject* parent)