diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp index 08651372c2..0a13586ab3 100644 --- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp @@ -60,7 +60,7 @@ ErrorOr BackgroundSettingsWidget::create_frame() m_wallpaper_view->set_model(GUI::FileSystemModel::create("/res/wallpapers")); m_wallpaper_view->set_model_column(GUI::FileSystemModel::Column::Name); m_wallpaper_view->on_selection_change = [this] { - String path = String::from_utf8_short_string(""sv); + String path; if (!m_wallpaper_view->selection().is_empty()) { auto index = m_wallpaper_view->selection().first(); auto path_or_error = String::from_deprecated_string(static_cast(m_wallpaper_view->model())->full_path(index)); diff --git a/Userland/Applications/Spreadsheet/HelpWindow.cpp b/Userland/Applications/Spreadsheet/HelpWindow.cpp index 9e30e316a9..50454774b5 100644 --- a/Userland/Applications/Spreadsheet/HelpWindow.cpp +++ b/Userland/Applications/Spreadsheet/HelpWindow.cpp @@ -123,7 +123,7 @@ HelpWindow::HelpWindow(GUI::Window* parent) widget->add_sheet(sheet.release_nonnull()); window->show(); - } else if (url.host() == String::from_utf8_short_string("doc"sv)) { + } else if (url.host() == "doc"_short_string) { auto entry = LexicalPath::basename(url.serialize_path()); m_webview->load(URL::create_with_data("text/html"sv, render(entry))); } else { diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp index 05ea62a90e..018b26c491 100644 --- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp +++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp @@ -264,7 +264,7 @@ Optional Sheet::position_from_url(const URL& url) const return {}; } - if (url.scheme() != "spreadsheet" || url.host() != String::from_utf8_short_string("cell"sv)) { + if (url.scheme() != "spreadsheet" || url.host() != "cell"_short_string) { dbgln("Bad url: {}", url.to_deprecated_string()); return {}; } @@ -757,7 +757,7 @@ URL Position::to_url(Sheet const& sheet) const { URL url; url.set_scheme("spreadsheet"); - url.set_host(String::from_utf8_short_string("cell"sv)); + url.set_host("cell"_short_string); url.set_paths({ DeprecatedString::number(getpid()) }); url.set_fragment(to_cell_identifier(sheet)); return url; diff --git a/Userland/Libraries/LibManual/Node.cpp b/Userland/Libraries/LibManual/Node.cpp index adfd519b99..ae3bf0e38d 100644 --- a/Userland/Libraries/LibManual/Node.cpp +++ b/Userland/Libraries/LibManual/Node.cpp @@ -82,7 +82,7 @@ ErrorOr> Node::try_create_from_query(Vector> Node::try_find_from_help_url(URL const& url) { - if (url.host() != String::from_utf8_short_string("man"sv)) + if (url.host() != "man"_short_string) return Error::from_string_view("Bad help operation"sv); if (url.path_segment_count() < 2) return Error::from_string_view("Bad help page URL"sv); diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index e316ccf1f6..9a7a24f5df 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -1142,7 +1142,7 @@ WebIDL::ExceptionOr BrowsingContext::navigate( } else { // Otherwise let navigation id be the result of generating a random UUID. [UUID] // FIXME: Generate a UUID. - navigation_id = String::from_utf8_short_string("FIXME"sv); + navigation_id = "FIXME"_short_string; } } diff --git a/Userland/Utilities/markdown-check.cpp b/Userland/Utilities/markdown-check.cpp index fd5d1fc5d8..289406b90d 100644 --- a/Userland/Utilities/markdown-check.cpp +++ b/Userland/Utilities/markdown-check.cpp @@ -191,7 +191,7 @@ RecursionDecision MarkdownLinkage::visit(Markdown::Text::LinkNode const& link_no return RecursionDecision::Recurse; } if (url.scheme() == "help") { - if (url.host() != String::from_utf8_short_string("man"sv)) { + if (url.host() != "man"_short_string) { warnln("help:// URL without 'man': {}", href); m_has_invalid_link = true; return RecursionDecision::Recurse; diff --git a/Userland/Utilities/netstat.cpp b/Userland/Utilities/netstat.cpp index 93c90adf09..e930601787 100644 --- a/Userland/Utilities/netstat.cpp +++ b/Userland/Utilities/netstat.cpp @@ -138,7 +138,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto get_formatted_user = [&](i32 uid) -> ErrorOr { if (uid == -1) - return String::from_utf8_short_string("-"sv); + return "-"_short_string; return String::number(uid); };