1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibCore+LibGUI+About: Use String in Core::Version and GUI::AboutDialog

The Core::Version API now returns ErrorOr<String>, and the
GUI::AboutDialog API was adjusted to accommodate this.
This commit is contained in:
Andreas Kling 2023-02-28 16:39:41 +01:00
parent ad4b4046f4
commit d0977ac566
7 changed files with 40 additions and 33 deletions

View file

@ -21,7 +21,12 @@ 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()).release_value_but_fixme_should_propagate_errors();
AboutDialog::show(
String::from_utf8(app_name).release_value_but_fixme_should_propagate_errors(),
Core::Version::read_long_version_string().release_value_but_fixme_should_propagate_errors(),
app_icon.bitmap_for_size(32),
weak_parent)
.release_value_but_fixme_should_propagate_errors();
});
action->set_status_tip("Show application about box");
return action;