mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:45:07 +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
|
@ -22,17 +22,17 @@ ErrorOr<NonnullRefPtr<ProcessFileDescriptorMapWidget>> ProcessFileDescriptorMapW
|
|||
widget->m_table_view = TRY(widget->try_add<GUI::TableView>());
|
||||
|
||||
Vector<GUI::JsonArrayModel::FieldSpec> pid_fds_fields;
|
||||
TRY(pid_fds_fields.try_empend("fd", "FD"_short_string, Gfx::TextAlignment::CenterRight));
|
||||
TRY(pid_fds_fields.try_empend("class", "Class"_short_string, Gfx::TextAlignment::CenterLeft));
|
||||
TRY(pid_fds_fields.try_empend("offset", "Offset"_short_string, Gfx::TextAlignment::CenterRight));
|
||||
TRY(pid_fds_fields.try_empend("absolute_path", "Path"_short_string, Gfx::TextAlignment::CenterLeft));
|
||||
TRY(pid_fds_fields.try_empend("Access"_short_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
TRY(pid_fds_fields.try_empend("fd", "FD"_string, Gfx::TextAlignment::CenterRight));
|
||||
TRY(pid_fds_fields.try_empend("class", "Class"_string, Gfx::TextAlignment::CenterLeft));
|
||||
TRY(pid_fds_fields.try_empend("offset", "Offset"_string, Gfx::TextAlignment::CenterRight));
|
||||
TRY(pid_fds_fields.try_empend("absolute_path", "Path"_string, Gfx::TextAlignment::CenterLeft));
|
||||
TRY(pid_fds_fields.try_empend("Access"_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("seekable"sv).value_or(false) ? "Seekable" : "Sequential";
|
||||
}));
|
||||
TRY(pid_fds_fields.try_empend("Blocking"_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("blocking"sv).value_or(false) ? "Blocking" : "Nonblocking";
|
||||
}));
|
||||
TRY(pid_fds_fields.try_empend("On exec"_short_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
TRY(pid_fds_fields.try_empend("On exec"_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("cloexec"sv).value_or(false) ? "Close" : "Keep";
|
||||
}));
|
||||
TRY(pid_fds_fields.try_empend("Can read"_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue