1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibGUI+Userland: Port StatusBar::set_override_text() to String

This commit is contained in:
Karol Kosek 2023-06-04 11:00:35 +02:00 committed by Sam Atkins
parent 5234a30731
commit 92ff12a0d0
8 changed files with 17 additions and 17 deletions

View file

@ -315,12 +315,15 @@ void Action::set_tooltip(DeprecatedString tooltip)
});
}
DeprecatedString Action::status_tip() const
Optional<String> Action::status_tip() const
{
if (!m_status_tip.is_empty())
return m_status_tip.to_deprecated_string();
return m_status_tip;
return Gfx::parse_ampersand_string(m_text);
auto maybe_parsed_action_text = String::from_deprecated_string(Gfx::parse_ampersand_string(m_text));
if (maybe_parsed_action_text.is_error())
return {};
return maybe_parsed_action_text.release_value();
}
}