mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
This commit is contained in:
parent
e5f09ea170
commit
3f3f45580a
762 changed files with 8315 additions and 8316 deletions
|
@ -239,7 +239,7 @@ void MonitorSettingsWidget::apply_settings()
|
|||
seconds_until_revert, seconds_until_revert == 1 ? "second" : "seconds");
|
||||
};
|
||||
|
||||
auto box = GUI::MessageBox::construct(window(), box_text(), "Apply new screen layout",
|
||||
auto box = GUI::MessageBox::construct(window(), box_text(), "Apply new screen layout"sv,
|
||||
GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
||||
box->set_icon(window()->icon());
|
||||
|
||||
|
@ -258,20 +258,20 @@ void MonitorSettingsWidget::apply_settings()
|
|||
auto save_result = GUI::ConnectionToWindowServer::the().save_screen_layout();
|
||||
if (!save_result.success()) {
|
||||
GUI::MessageBox::show(window(), String::formatted("Error saving settings: {}", save_result.error_msg()),
|
||||
"Unable to save setting", GUI::MessageBox::Type::Error);
|
||||
"Unable to save setting"sv, GUI::MessageBox::Type::Error);
|
||||
}
|
||||
} else {
|
||||
auto restore_result = GUI::ConnectionToWindowServer::the().set_screen_layout(current_layout, false);
|
||||
if (!restore_result.success()) {
|
||||
GUI::MessageBox::show(window(), String::formatted("Error restoring settings: {}", restore_result.error_msg()),
|
||||
"Unable to restore setting", GUI::MessageBox::Type::Error);
|
||||
"Unable to restore setting"sv, GUI::MessageBox::Type::Error);
|
||||
} else {
|
||||
load_current_settings();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GUI::MessageBox::show(window(), String::formatted("Error setting screen layout: {}", result.error_msg()),
|
||||
"Unable to apply changes", GUI::MessageBox::Type::Error);
|
||||
"Unable to apply changes"sv, GUI::MessageBox::Type::Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue