mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:17:46 +00:00
Userland: Prefer _string
over _short_string
As `_string` can't fail anymore (since 3434412
), there are no real
benefits to use the short variant in most cases.
This commit is contained in:
parent
a5edc9cdfc
commit
3f35ffb648
198 changed files with 684 additions and 684 deletions
|
@ -137,7 +137,7 @@ ErrorOr<String> DisassemblyModel::column_name(int column) const
|
|||
case Column::SampleCount:
|
||||
return m_profile.show_percentages() ? "% Samples"_string : "# Samples"_string;
|
||||
case Column::Address:
|
||||
return "Address"_short_string;
|
||||
return "Address"_string;
|
||||
case Column::InstructionBytes:
|
||||
return "Insn Bytes"_string;
|
||||
case Column::Disassembly:
|
||||
|
|
|
@ -146,7 +146,7 @@ ErrorOr<String> FileEventModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::Path:
|
||||
return "Path"_short_string;
|
||||
return "Path"_string;
|
||||
case Column::Count:
|
||||
return "Event Count"_string;
|
||||
case Column::Duration:
|
||||
|
|
|
@ -33,11 +33,11 @@ ErrorOr<String> IndividualSampleModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::Address:
|
||||
return "Address"_short_string;
|
||||
return "Address"_string;
|
||||
case Column::ObjectName:
|
||||
return "Object"_short_string;
|
||||
return "Object"_string;
|
||||
case Column::Symbol:
|
||||
return "Symbol"_short_string;
|
||||
return "Symbol"_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -80,9 +80,9 @@ ErrorOr<String> ProfileModel::column_name(int column) const
|
|||
case Column::SampleCount:
|
||||
return m_profile.show_percentages() ? "% Samples"_string : "# Samples"_string;
|
||||
case Column::SelfCount:
|
||||
return m_profile.show_percentages() ? "% Self"_short_string : "# Self"_short_string;
|
||||
return m_profile.show_percentages() ? "% Self"_string : "# Self"_string;
|
||||
case Column::ObjectName:
|
||||
return "Object"_short_string;
|
||||
return "Object"_string;
|
||||
case Column::StackFrame:
|
||||
return "Stack Frame"_string;
|
||||
case Column::SymbolAddress:
|
||||
|
|
|
@ -32,13 +32,13 @@ ErrorOr<String> SamplesModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::SampleIndex:
|
||||
return "#"_short_string;
|
||||
return "#"_string;
|
||||
case Column::Timestamp:
|
||||
return "Timestamp"_string;
|
||||
case Column::ProcessID:
|
||||
return "PID"_short_string;
|
||||
return "PID"_string;
|
||||
case Column::ThreadID:
|
||||
return "TID"_short_string;
|
||||
return "TID"_string;
|
||||
case Column::ExecutableName:
|
||||
return "Executable"_string;
|
||||
case Column::LostSamples:
|
||||
|
@ -46,7 +46,7 @@ ErrorOr<String> SamplesModel::column_name(int column) const
|
|||
case Column::InnermostStackFrame:
|
||||
return "Innermost Frame"_string;
|
||||
case Column::Path:
|
||||
return "Path"_short_string;
|
||||
return "Path"_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -30,17 +30,17 @@ ErrorOr<String> SignpostsModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::SignpostIndex:
|
||||
return "#"_short_string;
|
||||
return "#"_string;
|
||||
case Column::Timestamp:
|
||||
return "Timestamp"_string;
|
||||
case Column::ProcessID:
|
||||
return "PID"_short_string;
|
||||
return "PID"_string;
|
||||
case Column::ThreadID:
|
||||
return "TID"_short_string;
|
||||
return "TID"_string;
|
||||
case Column::ExecutableName:
|
||||
return "Executable"_string;
|
||||
case Column::SignpostString:
|
||||
return "String"_short_string;
|
||||
return "String"_string;
|
||||
case Column::SignpostArgument:
|
||||
return "Argument"_string;
|
||||
default:
|
||||
|
|
|
@ -132,7 +132,7 @@ ErrorOr<String> SourceModel::column_name(int column) const
|
|||
case Column::Location:
|
||||
return "Location"_string;
|
||||
case Column::LineNumber:
|
||||
return "Line"_short_string;
|
||||
return "Line"_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -265,10 +265,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
filesystem_events_tree_view->set_selection_behavior(GUI::TreeView::SelectionBehavior::SelectRows);
|
||||
filesystem_events_tree_view->set_model(profile->file_event_model());
|
||||
|
||||
auto file_menu = TRY(window->try_add_menu("&File"_short_string));
|
||||
auto file_menu = TRY(window->try_add_menu("&File"_string));
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
|
||||
|
||||
auto view_menu = TRY(window->try_add_menu("&View"_short_string));
|
||||
auto view_menu = TRY(window->try_add_menu("&View"_string));
|
||||
|
||||
auto invert_action = GUI::Action::create_checkable("&Invert Tree", { Mod_Ctrl, Key_I }, [&](auto& action) {
|
||||
profile->set_inverted(action.is_checked());
|
||||
|
@ -294,7 +294,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(disassembly_action));
|
||||
TRY(view_menu->try_add_action(source_action));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"_short_string));
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"_string));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
|
||||
TRY(help_menu->try_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");
|
||||
|
@ -317,7 +317,7 @@ static bool prompt_to_stop_profiling(pid_t pid, DeprecatedString const& process_
|
|||
widget->set_fill_with_background_color(true);
|
||||
widget->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 0, 0, 16 });
|
||||
|
||||
auto& timer_label = widget->add<GUI::Label>("..."_short_string);
|
||||
auto& timer_label = widget->add<GUI::Label>("..."_string);
|
||||
Core::ElapsedTimer clock;
|
||||
clock.start();
|
||||
auto update_timer = Core::Timer::create_repeating(100, [&] {
|
||||
|
@ -325,7 +325,7 @@ static bool prompt_to_stop_profiling(pid_t pid, DeprecatedString const& process_
|
|||
}).release_value_but_fixme_should_propagate_errors();
|
||||
update_timer->start();
|
||||
|
||||
auto& stop_button = widget->add<GUI::Button>("Stop"_short_string);
|
||||
auto& stop_button = widget->add<GUI::Button>("Stop"_string);
|
||||
stop_button.set_fixed_size(140, 22);
|
||||
stop_button.on_click = [&](auto) {
|
||||
GUI::Application::the()->quit();
|
||||
|
@ -338,7 +338,7 @@ static bool prompt_to_stop_profiling(pid_t pid, DeprecatedString const& process_
|
|||
bool generate_profile(pid_t& pid)
|
||||
{
|
||||
if (!pid) {
|
||||
auto process_chooser = GUI::ProcessChooser::construct("Profiler"sv, "Profile"_short_string, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-profiler.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
auto process_chooser = GUI::ProcessChooser::construct("Profiler"sv, "Profile"_string, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-profiler.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
if (process_chooser->exec() == GUI::Dialog::ExecResult::Cancel)
|
||||
return false;
|
||||
pid = process_chooser->pid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue