diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index 7e01ee46ade..a8a0c5875fa 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -564,7 +564,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("3D File Viewer", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("3D File Viewer"_string, app_icon, window)); window->show(); diff --git a/Userland/Applications/Browser/WindowActions.cpp b/Userland/Applications/Browser/WindowActions.cpp index 3a1ae4fb384..5ce96d620e2 100644 --- a/Userland/Applications/Browser/WindowActions.cpp +++ b/Userland/Applications/Browser/WindowActions.cpp @@ -75,7 +75,7 @@ WindowActions::WindowActions(GUI::Window& window) &window)); m_tab_actions.last()->set_status_tip("Switch to last tab"_string); - m_about_action = GUI::CommonActions::make_about_action("Ladybird", GUI::Icon::default_icon("app-browser"sv), &window); + m_about_action = GUI::CommonActions::make_about_action("Ladybird"_string, GUI::Icon::default_icon("app-browser"sv), &window); m_show_bookmarks_bar_action = GUI::Action::create_checkable( "&Bookmarks Bar", { Mod_Ctrl, Key_B }, diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 303d15f2239..49e52cddc1c 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -123,7 +123,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Calculator", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Calculator"_string, app_icon, window)); window->show(); diff --git a/Userland/Applications/Calendar/CalendarWidget.cpp b/Userland/Applications/Calendar/CalendarWidget.cpp index 6674a6ef00b..e85616dc78d 100644 --- a/Userland/Applications/Calendar/CalendarWidget.cpp +++ b/Userland/Applications/Calendar/CalendarWidget.cpp @@ -105,7 +105,7 @@ ErrorOr> CalendarWidget::create(GUI::Window* paren auto help_menu = parent_window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(parent_window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Calendar", TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)), parent_window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Calendar"_string, TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)), parent_window)); return widget; } diff --git a/Userland/Applications/CharacterMap/CharacterMapWidget.cpp b/Userland/Applications/CharacterMap/CharacterMapWidget.cpp index 0eeecd9c933..0d62f0905c8 100644 --- a/Userland/Applications/CharacterMap/CharacterMapWidget.cpp +++ b/Userland/Applications/CharacterMap/CharacterMapWidget.cpp @@ -169,7 +169,7 @@ ErrorOr CharacterMapWidget::initialize_menubar(GUI::Window& window) help_menu->add_action(GUI::CommonActions::make_help_action([&](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/CharacterMap.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Character Map", GUI::Icon::default_icon("app-character-map"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Character Map"_string, GUI::Icon::default_icon("app-character-map"sv), &window)); return {}; } diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 58b43adfa3c..ead43d1d18b 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -1071,7 +1071,7 @@ ErrorOr run_in_windowed_mode(DeprecatedString const& initial_location, Depr auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("File Manager"sv, GUI::Icon::default_icon("app-file-manager"sv), window)); + help_menu->add_action(GUI::CommonActions::make_about_action("File Manager"_string, GUI::Icon::default_icon("app-file-manager"sv), window)); main_toolbar.add_action(go_back_action); main_toolbar.add_action(go_forward_action); diff --git a/Userland/Applications/FontEditor/MainWidget.cpp b/Userland/Applications/FontEditor/MainWidget.cpp index 1a8324f6f31..8cbcc674a72 100644 --- a/Userland/Applications/FontEditor/MainWidget.cpp +++ b/Userland/Applications/FontEditor/MainWidget.cpp @@ -798,7 +798,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/FontEditor.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Font Editor", TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Font Editor"_string, TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)), &window)); return {}; } diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp index 524554d7352..b09350e875c 100644 --- a/Userland/Applications/Help/MainWidget.cpp +++ b/Userland/Applications/Help/MainWidget.cpp @@ -221,7 +221,7 @@ ErrorOr MainWidget::initialize_fallibles(GUI::Window& window) help_menu->add_action(GUI::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [this, help_page_path = move(help_page_path)](auto&) { open_page(help_page_path); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Help", TRY(GUI::Icon::try_create_default_icon("app-help"sv)), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Help"_string, TRY(GUI::Icon::try_create_default_icon("app-help"sv)), &window)); m_context_menu = TRY(GUI::Menu::try_create()); m_context_menu->add_action(*m_go_back_action); diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 7f6c1936b1e..bf95e8e623d 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -548,7 +548,7 @@ ErrorOr HexEditorWidget::initialize_menubar(GUI::Window& window) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/HexEditor.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Hex Editor", GUI::Icon::default_icon("app-hex-editor"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Hex Editor"_string, GUI::Icon::default_icon("app-hex-editor"sv), &window)); return {}; } diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp index 73c7cb2b894..c7de3b113cb 100644 --- a/Userland/Applications/ImageViewer/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -369,7 +369,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/ImageViewer.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Image Viewer", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Image Viewer"_string, app_icon, window)); window->show(); diff --git a/Userland/Applications/KeyboardMapper/main.cpp b/Userland/Applications/KeyboardMapper/main.cpp index e10da45228e..374ed7398cd 100644 --- a/Userland/Applications/KeyboardMapper/main.cpp +++ b/Userland/Applications/KeyboardMapper/main.cpp @@ -95,7 +95,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Keyboard Mapper", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Keyboard Mapper"_string, app_icon, window)); window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision { if (keyboard_mapper_widget->request_close()) diff --git a/Userland/Applications/Magnifier/main.cpp b/Userland/Applications/Magnifier/main.cpp index c8e6952c407..39eb03a82b9 100644 --- a/Userland/Applications/Magnifier/main.cpp +++ b/Userland/Applications/Magnifier/main.cpp @@ -177,7 +177,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Magnifier.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier"_string, app_icon, window)); window->show(); window->set_always_on_top(true); diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp index 2613d0caccf..d3324495386 100644 --- a/Userland/Applications/Mail/main.cpp +++ b/Userland/Applications/Mail/main.cpp @@ -54,7 +54,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Mail", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Mail"_string, app_icon, window)); window->on_close_request = [&] { mail_widget->on_window_close(); diff --git a/Userland/Applications/Maps/main.cpp b/Userland/Applications/Maps/main.cpp index 1161f1cbfe4..e0ec6608532 100644 --- a/Userland/Applications/Maps/main.cpp +++ b/Userland/Applications/Maps/main.cpp @@ -80,7 +80,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Maps", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Maps"_string, app_icon, window)); // Main toolbar actions toolbar->add_action(show_users_action); diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp index 594bcfad166..acaeb7b8f89 100644 --- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp +++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp @@ -243,7 +243,7 @@ ErrorOr PDFViewerWidget::initialize_menubar(GUI::Window& window) auto help_menu = window.add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window)); - help_menu->add_action(GUI::CommonActions::make_about_action("PDF Viewer", GUI::Icon::default_icon("app-pdf-viewer"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("PDF Viewer"_string, GUI::Icon::default_icon("app-pdf-viewer"sv), &window)); return {}; } diff --git a/Userland/Applications/PartitionEditor/main.cpp b/Userland/Applications/PartitionEditor/main.cpp index 717a38d033b..edb6095aa58 100644 --- a/Userland/Applications/PartitionEditor/main.cpp +++ b/Userland/Applications/PartitionEditor/main.cpp @@ -87,7 +87,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Partition Editor", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Partition Editor"_string, app_icon, window)); window->show(); return app->exec(); diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index 461a27ccf0d..f187e324ced 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -88,7 +88,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Piano", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Piano"_string, app_icon, window)); window->show(); diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index 6b838aafa9e..ce2b7057ecd 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -1164,7 +1164,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) auto help_menu = window.add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Pixel Paint", GUI::Icon::default_icon("app-pixel-paint"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Pixel Paint"_string, GUI::Icon::default_icon("app-pixel-paint"sv), &window)); m_levels_dialog_action = GUI::Action::create( "Change &Levels...", { Mod_Ctrl, Key_L }, g_icon_bag.levels, [&](auto&) { diff --git a/Userland/Applications/Presenter/PresenterWidget.cpp b/Userland/Applications/Presenter/PresenterWidget.cpp index 2c75f5d1bb1..bc0e4bb3280 100644 --- a/Userland/Applications/Presenter/PresenterWidget.cpp +++ b/Userland/Applications/Presenter/PresenterWidget.cpp @@ -118,7 +118,7 @@ ErrorOr PresenterWidget::initialize_menubar() update_slides_actions(); auto help_menu = window->add_menu("&Help"_string); - help_menu->add_action(GUI::CommonActions::make_about_action("Presenter", GUI::Icon::default_icon("app-presenter"sv))); + help_menu->add_action(GUI::CommonActions::make_about_action("Presenter"_string, GUI::Icon::default_icon("app-presenter"sv))); return {}; } diff --git a/Userland/Applications/Settings/main.cpp b/Userland/Applications/Settings/main.cpp index 0ef1c4305fe..f824f0bf147 100644 --- a/Userland/Applications/Settings/main.cpp +++ b/Userland/Applications/Settings/main.cpp @@ -99,7 +99,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Settings", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Settings"_string, app_icon, window)); auto main_widget = TRY(window->set_main_widget()); main_widget->set_fill_with_background_color(true); diff --git a/Userland/Applications/SoundPlayer/main.cpp b/Userland/Applications/SoundPlayer/main.cpp index 91c9a0f4c70..ba2cfa2b9a4 100644 --- a/Userland/Applications/SoundPlayer/main.cpp +++ b/Userland/Applications/SoundPlayer/main.cpp @@ -165,7 +165,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Sound Player", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Sound Player"_string, app_icon, window)); window->show(); return app->exec(); diff --git a/Userland/Applications/SpaceAnalyzer/main.cpp b/Userland/Applications/SpaceAnalyzer/main.cpp index 5ecd8ee79ca..15ffe4d0367 100644 --- a/Userland/Applications/SpaceAnalyzer/main.cpp +++ b/Userland/Applications/SpaceAnalyzer/main.cpp @@ -26,7 +26,7 @@ #include #include -static constexpr auto APP_NAME = "Space Analyzer"sv; +static auto const APP_NAME = "Space Analyzer"_string; static DeprecatedString get_absolute_path_to_selected_node(SpaceAnalyzer::TreeMapWidget const& tree_map_widget, bool include_last_node = true) { @@ -48,7 +48,7 @@ ErrorOr serenity_main(Main::Arguments arguments) // Configure application window. auto app_icon = GUI::Icon::default_icon("app-space-analyzer"sv); auto window = TRY(GUI::Window::try_create()); - window->set_title(APP_NAME); + window->set_title(APP_NAME.bytes_as_string_view()); window->resize(640, 480); window->set_icon(app_icon.bitmap_for_size(16)); diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp index 9e54c66f15c..66844376e38 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp @@ -293,7 +293,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor"_string, app_icon, window)); process_table_view.on_activation = [&](auto&) { if (process_properties_action->is_enabled()) diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 8655a615a00..da8be7e1bde 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -423,7 +423,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Terminal.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Terminal", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Terminal"_string, app_icon, window)); window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision { if (check_terminal_quit() == GUI::MessageBox::ExecResult::OK) diff --git a/Userland/Applications/TextEditor/MainWidget.cpp b/Userland/Applications/TextEditor/MainWidget.cpp index 6121d3e7b23..fc13be59d95 100644 --- a/Userland/Applications/TextEditor/MainWidget.cpp +++ b/Userland/Applications/TextEditor/MainWidget.cpp @@ -694,7 +694,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/TextEditor.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Text Editor", GUI::Icon::default_icon("app-text-editor"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Text Editor"_string, GUI::Icon::default_icon("app-text-editor"sv), &window)); auto wrapping_statusbar_menu = m_line_column_statusbar_menu->add_submenu("&Wrapping Mode"_string); wrapping_statusbar_menu->add_action(*m_no_wrapping_action); diff --git a/Userland/Applications/ThemeEditor/MainWidget.cpp b/Userland/Applications/ThemeEditor/MainWidget.cpp index 6584dc9b4b0..fd5aad22814 100644 --- a/Userland/Applications/ThemeEditor/MainWidget.cpp +++ b/Userland/Applications/ThemeEditor/MainWidget.cpp @@ -309,7 +309,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) auto help_menu = window.add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Theme Editor", GUI::Icon::default_icon("app-theme-editor"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Theme Editor"_string, GUI::Icon::default_icon("app-theme-editor"sv), &window)); return {}; } diff --git a/Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp b/Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp index 6a14bd77486..dd015ea7489 100644 --- a/Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp +++ b/Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp @@ -428,7 +428,7 @@ ErrorOr VideoPlayerWidget::initialize_menubar(GUI::Window& window) // Help menu auto help_menu = window.add_menu("&Help"_string); - help_menu->add_action(GUI::CommonActions::make_about_action("Video Player", TRY(GUI::Icon::try_create_default_icon("app-video-player"sv)), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Video Player"_string, TRY(GUI::Icon::try_create_default_icon("app-video-player"sv)), &window)); return {}; } diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index 7fe655d3e27..8d995882302 100644 --- a/Userland/Demos/CatDog/main.cpp +++ b/Userland/Demos/CatDog/main.cpp @@ -45,7 +45,7 @@ ErrorOr serenity_main(Main::Arguments arguments) catdog_widget->set_layout(GUI::Margins {}, 0); auto context_menu = TRY(GUI::Menu::try_create()); - context_menu->add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window)); + context_menu->add_action(GUI::CommonActions::make_about_action("CatDog Demo"_string, app_icon, window)); context_menu->add_separator(); context_menu->add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index 7d53c37653b..ccfaf9c73cf 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -94,7 +94,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Eyes.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Eyes Demo", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Eyes Demo"_string, app_icon, window)); auto eyes_widget = TRY(window->set_main_widget(num_eyes, full_rows, extra_columns)); eyes_widget->on_context_menu_request = [&](auto& event) { diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp index 69677c817bb..dfc013a44d8 100644 --- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp +++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp @@ -476,7 +476,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Mandelbrot Demo", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Mandelbrot Demo"_string, app_icon, window)); window->show(); window->set_cursor(Gfx::StandardCursor::Zoom); diff --git a/Userland/Demos/Screensaver/main.cpp b/Userland/Demos/Screensaver/main.cpp index c54fe83e49a..c3c08096139 100644 --- a/Userland/Demos/Screensaver/main.cpp +++ b/Userland/Demos/Screensaver/main.cpp @@ -83,7 +83,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Screensaver", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Screensaver"_string, app_icon, window)); auto main_widget = TRY(window->set_main_widget()); main_widget->set_fill_with_background_color(true); diff --git a/Userland/DevTools/GMLPlayground/MainWidget.cpp b/Userland/DevTools/GMLPlayground/MainWidget.cpp index 02e854e6565..c70d0369183 100644 --- a/Userland/DevTools/GMLPlayground/MainWidget.cpp +++ b/Userland/DevTools/GMLPlayground/MainWidget.cpp @@ -277,7 +277,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/GMLPlayground.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("GML Playground", m_icon, &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("GML Playground"_string, m_icon, &window)); m_toolbar->add_action(open_action); m_toolbar->add_action(*m_save_action); diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 34a0b869d8a..4551f4f6489 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -1583,7 +1583,7 @@ void HackStudioWidget::create_help_menu(GUI::Window& window) { auto help_menu = window.add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Hack Studio", GUI::Icon::default_icon("app-hack-studio"sv), &window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Hack Studio"_string, GUI::Icon::default_icon("app-hack-studio"sv), &window)); } ErrorOr> HackStudioWidget::create_stop_action() diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index 3a0d886355f..23617ee8068 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -305,7 +305,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Profiler.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Profiler", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Profiler"_string, app_icon, window)); window->show(); return app->exec(); diff --git a/Userland/DevTools/SQLStudio/MainWidget.cpp b/Userland/DevTools/SQLStudio/MainWidget.cpp index fb111629e50..1b83430b08d 100644 --- a/Userland/DevTools/SQLStudio/MainWidget.cpp +++ b/Userland/DevTools/SQLStudio/MainWidget.cpp @@ -327,7 +327,7 @@ ErrorOr MainWidget::initialize_menu(GUI::Window* window) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/SQLStudio.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("SQL Studio", GUI::Icon::default_icon("app-sql-studio"sv), window)); + help_menu->add_action(GUI::CommonActions::make_about_action("SQL Studio"_string, GUI::Icon::default_icon("app-sql-studio"sv), window)); return {}; } diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index 84c2e2eb1b4..61d3ca4f8ba 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -221,7 +221,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/2048.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("2048", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("2048"_string, app_icon, window)); window->show(); diff --git a/Userland/Games/BrickGame/main.cpp b/Userland/Games/BrickGame/main.cpp index 901a412753c..f85be82ee5d 100644 --- a/Userland/Games/BrickGame/main.cpp +++ b/Userland/Games/BrickGame/main.cpp @@ -26,7 +26,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto app = TRY(GUI::Application::create(arguments)); auto const app_name = "BrickGame"sv; - auto const title = "Brick Game"sv; + auto const title = "Brick Game"_string; auto const man_file = "/usr/share/man/man6/BrickGame.md"sv; Config::pledge_domain(app_name); @@ -45,7 +45,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto window = TRY(GUI::Window::try_create()); window->set_double_buffering_enabled(false); - window->set_title(title); + window->set_title(title.bytes_as_string_view()); window->resize(360, 462); window->set_resizable(false); diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 29c9b665e85..e4a7ffbe41f 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -198,7 +198,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Chess.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Chess", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Chess"_string, app_icon, window)); window->show(); widget->reset(); diff --git a/Userland/Games/ColorLines/main.cpp b/Userland/Games/ColorLines/main.cpp index 132e319a470..a37f933704c 100644 --- a/Userland/Games/ColorLines/main.cpp +++ b/Userland/Games/ColorLines/main.cpp @@ -25,7 +25,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto app = TRY(GUI::Application::create(arguments)); auto const app_name = "ColorLines"sv; - auto const title = "Color Lines"sv; + auto const title = "Color Lines"_string; auto const man_file = "/usr/share/man/man6/ColorLines.md"sv; Config::pledge_domain(app_name); @@ -44,7 +44,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto window = TRY(GUI::Window::try_create()); window->set_double_buffering_enabled(false); - window->set_title(title); + window->set_title(title.bytes_as_string_view()); window->resize(436, 481); window->set_resizable(false); diff --git a/Userland/Games/FlappyBug/main.cpp b/Userland/Games/FlappyBug/main.cpp index 5f8697ae5a9..8b681b284fb 100644 --- a/Userland/Games/FlappyBug/main.cpp +++ b/Userland/Games/FlappyBug/main.cpp @@ -65,7 +65,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/FlappyBug.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Flappy Bug", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Flappy Bug"_string, app_icon, window)); window->show(); diff --git a/Userland/Games/Flood/main.cpp b/Userland/Games/Flood/main.cpp index 4c4e5649006..48f10db8f7a 100644 --- a/Userland/Games/Flood/main.cpp +++ b/Userland/Games/Flood/main.cpp @@ -192,7 +192,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Flood.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Flood", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Flood"_string, app_icon, window)); window->show(); diff --git a/Userland/Games/GameOfLife/main.cpp b/Userland/Games/GameOfLife/main.cpp index 0c855f607f0..1dd63943f83 100644 --- a/Userland/Games/GameOfLife/main.cpp +++ b/Userland/Games/GameOfLife/main.cpp @@ -150,7 +150,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/GameOfLife.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Game of Life", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Game of Life"_string, app_icon, window)); board_widget->on_running_state_change = [&]() { if (board_widget->is_running()) { diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp index 58939203857..326197c1a42 100644 --- a/Userland/Games/Hearts/main.cpp +++ b/Userland/Games/Hearts/main.cpp @@ -103,7 +103,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Hearts.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Hearts", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Hearts"_string, app_icon, window)); window->set_resizable(false); window->resize(Hearts::Game::width, Hearts::Game::height + statusbar.max_height().as_int()); diff --git a/Userland/Games/MasterWord/main.cpp b/Userland/Games/MasterWord/main.cpp index e59488f2fb4..6a756b2b332 100644 --- a/Userland/Games/MasterWord/main.cpp +++ b/Userland/Games/MasterWord/main.cpp @@ -132,7 +132,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/MasterWord.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("MasterWord", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("MasterWord"_string, app_icon, window)); game.on_message = [&](auto message) { if (!message.has_value()) diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 02b93a0b0a8..53e2e63e676 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -123,7 +123,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Minesweeper.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Minesweeper", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Minesweeper"_string, app_icon, window)); window->show(); diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index 9fb74dfd948..ac956a7c968 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -156,7 +156,7 @@ ErrorOr serenity_main(Main::Arguments arguments) help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Snake.md"), "/bin/Help"); })); - help_menu->add_action(GUI::CommonActions::make_about_action("Snake", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Snake"_string, app_icon, window)); window->show(); diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index e87f5ac37af..c5a3bf40753 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -222,7 +222,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Solitaire", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Solitaire"_string, app_icon, window)); help_menu->add_action(GUI::CommonActions::make_help_action([&man_file](auto&) { Desktop::Launcher::open(URL::create_with_file_scheme(man_file), "/bin/Help"); diff --git a/Userland/Games/Spider/main.cpp b/Userland/Games/Spider/main.cpp index 4e291e368c2..d0a402b8985 100644 --- a/Userland/Games/Spider/main.cpp +++ b/Userland/Games/Spider/main.cpp @@ -279,7 +279,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto help_menu = window->add_menu("&Help"_string); help_menu->add_action(GUI::CommonActions::make_command_palette_action(window)); - help_menu->add_action(GUI::CommonActions::make_about_action("Spider", app_icon, window)); + help_menu->add_action(GUI::CommonActions::make_about_action("Spider"_string, app_icon, window)); window->set_resizable(false); window->resize(Spider::Game::width, Spider::Game::height + statusbar.max_height().as_int()); diff --git a/Userland/Libraries/LibGUI/AboutDialog.cpp b/Userland/Libraries/LibGUI/AboutDialog.cpp index 968028fe0fa..4525d62f725 100644 --- a/Userland/Libraries/LibGUI/AboutDialog.cpp +++ b/Userland/Libraries/LibGUI/AboutDialog.cpp @@ -19,7 +19,7 @@ namespace GUI { -NonnullRefPtr AboutDialog::create(String name, String version, RefPtr icon, Window* parent_window) +NonnullRefPtr AboutDialog::create(String const& name, String version, RefPtr icon, Window* parent_window) { auto dialog = adopt_ref(*new AboutDialog(name, version, icon, parent_window)); dialog->set_title(DeprecatedString::formatted("About {}", name)); @@ -49,9 +49,9 @@ NonnullRefPtr AboutDialog::create(String name, String version, RefP return dialog; } -AboutDialog::AboutDialog(String name, String version, RefPtr icon, Window* parent_window) +AboutDialog::AboutDialog(String const& name, String version, RefPtr icon, Window* parent_window) : Dialog(parent_window) - , m_name(move(name)) + , m_name(name) , m_version_string(move(version)) , m_icon(move(icon)) { diff --git a/Userland/Libraries/LibGUI/AboutDialog.h b/Userland/Libraries/LibGUI/AboutDialog.h index 219004d089c..7e2336c987b 100644 --- a/Userland/Libraries/LibGUI/AboutDialog.h +++ b/Userland/Libraries/LibGUI/AboutDialog.h @@ -16,13 +16,13 @@ namespace GUI { class AboutDialog final : public Dialog { C_OBJECT_ABSTRACT(AboutDialog) public: - [[nodiscard]] static NonnullRefPtr create(String name, String version, RefPtr icon = nullptr, Window* parent_window = nullptr); + [[nodiscard]] static NonnullRefPtr create(String const& name, String version, RefPtr icon = nullptr, Window* parent_window = nullptr); virtual ~AboutDialog() override = default; static void show(String name, String version, RefPtr icon = nullptr, Window* parent_window = nullptr, RefPtr window_icon = nullptr); private: - AboutDialog(String name, String version, RefPtr icon = nullptr, Window* parent_window = nullptr); + AboutDialog(String const& name, String version, RefPtr icon = nullptr, Window* parent_window = nullptr); String m_name; String m_version_string; diff --git a/Userland/Libraries/LibGUI/Action.h b/Userland/Libraries/LibGUI/Action.h index f29020024d4..de2f8e257a0 100644 --- a/Userland/Libraries/LibGUI/Action.h +++ b/Userland/Libraries/LibGUI/Action.h @@ -24,7 +24,7 @@ namespace GUI { namespace CommonActions { -NonnullRefPtr make_about_action(DeprecatedString const& app_name, Icon const& app_icon, Window* parent = nullptr); +NonnullRefPtr make_about_action(String const& app_name, Icon const& app_icon, Window* parent = nullptr); NonnullRefPtr make_open_action(Function, Core::EventReceiver* parent = nullptr); NonnullRefPtr make_save_action(Function, Core::EventReceiver* parent = nullptr); NonnullRefPtr make_save_as_action(Function, Core::EventReceiver* parent = nullptr); diff --git a/Userland/Libraries/LibGUI/CommonActions.cpp b/Userland/Libraries/LibGUI/CommonActions.cpp index 5177276d279..dcc5a4119ef 100644 --- a/Userland/Libraries/LibGUI/CommonActions.cpp +++ b/Userland/Libraries/LibGUI/CommonActions.cpp @@ -17,12 +17,12 @@ namespace GUI { namespace CommonActions { -NonnullRefPtr make_about_action(DeprecatedString const& app_name, Icon const& app_icon, Window* parent) +NonnullRefPtr make_about_action(String const& app_name, Icon const& app_icon, Window* parent) { auto weak_parent = AK::make_weak_ptr_if_nonnull(parent); auto action = Action::create(DeprecatedString::formatted("&About {}", app_name), app_icon.bitmap_for_size(16), [=](auto&) { AboutDialog::show( - String::from_deprecated_string(app_name).release_value_but_fixme_should_propagate_errors(), + app_name, Core::Version::read_long_version_string().release_value_but_fixme_should_propagate_errors(), app_icon.bitmap_for_size(32), weak_parent);