LibGUI: Parse ampersand string for tooltips only in GUI::Action

It seems unnecessary to pass every tooltip string through
Gfx::parse_ampersand_string() when only Action tooltips need to parse a
title.
This commit is contained in:
Karol Kosek 2023-06-03 22:54:11 +02:00 committed by Andreas Kling
commit 16defb4806
Notes: sideshowbarker 2024-07-17 03:16:02 +09:00
4 changed files with 8 additions and 3 deletions

View file

@ -67,7 +67,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
for (auto const& category : s_emoji_groups) {
auto name = Unicode::emoji_group_to_string(category.group);
auto tooltip = name.replace("&"sv, "&&"sv, ReplaceMode::FirstOnly);
DeprecatedString tooltip = name;
auto set_filter_action = Action::create_checkable(
category.representative_emoji,