mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
GMessageBox: Hide the constructor and fix broken usages
We no longer support creating CObjects on the stack. Use construct().
This commit is contained in:
parent
c5e057438c
commit
1a279c5b2a
3 changed files with 5 additions and 5 deletions
|
@ -50,8 +50,7 @@ int main(int argc, char** argv)
|
|||
auto filename = picker.selected_file().string();
|
||||
auto bitmap = load_png(filename);
|
||||
if (!bitmap) {
|
||||
GMessageBox msgbox(String::format("Failed to load '%s'", filename.characters()), "Open failed", GMessageBox::Type::Error, GMessageBox::InputType::OK, window);
|
||||
msgbox.exec();
|
||||
GMessageBox::show(String::format("Failed to load '%s'", filename.characters()), "Open failed", GMessageBox::Type::Error, GMessageBox::InputType::OK, window);
|
||||
return;
|
||||
}
|
||||
paintable_widget->set_bitmap(*bitmap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue