mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user