1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:58:11 +00:00

LibGUI+About: Make AboutDialog creation fallible

This commit is contained in:
Sam Atkins 2023-02-02 17:07:49 +00:00 committed by Sam Atkins
parent 65c8dfe923
commit 89b8d346fe
4 changed files with 37 additions and 28 deletions

View file

@ -21,7 +21,7 @@ NonnullRefPtr<Action> make_about_action(DeprecatedString const& app_name, Icon c
{
auto weak_parent = AK::make_weak_ptr_if_nonnull<Window>(parent);
auto action = Action::create(DeprecatedString::formatted("&About {}", app_name), app_icon.bitmap_for_size(16), [=](auto&) {
AboutDialog::show(app_name, Core::Version::read_long_version_string(), app_icon.bitmap_for_size(32), weak_parent.ptr());
AboutDialog::show(app_name, Core::Version::read_long_version_string(), app_icon.bitmap_for_size(32), weak_parent.ptr()).release_value_but_fixme_should_propagate_errors();
});
action->set_status_tip("Show application about box");
return action;