mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35:08 +00:00
SystemMonitor: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
2df57d5ae0
commit
6fdfa9f313
5 changed files with 31 additions and 31 deletions
|
@ -27,19 +27,19 @@ ProcessFileDescriptorMapWidget::ProcessFileDescriptorMapWidget()
|
|||
pid_fds_fields.empend("offset", "Offset", Gfx::TextAlignment::CenterRight);
|
||||
pid_fds_fields.empend("absolute_path", "Path", Gfx::TextAlignment::CenterLeft);
|
||||
pid_fds_fields.empend("Access", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_deprecated("seekable"sv).to_bool() ? "Seekable" : "Sequential";
|
||||
return object.get_bool("seekable"sv).value_or(false) ? "Seekable" : "Sequential";
|
||||
});
|
||||
pid_fds_fields.empend("Blocking", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_deprecated("blocking"sv).to_bool() ? "Blocking" : "Nonblocking";
|
||||
return object.get_bool("blocking"sv).value_or(false) ? "Blocking" : "Nonblocking";
|
||||
});
|
||||
pid_fds_fields.empend("On exec", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_deprecated("cloexec"sv).to_bool() ? "Close" : "Keep";
|
||||
return object.get_bool("cloexec"sv).value_or(false) ? "Close" : "Keep";
|
||||
});
|
||||
pid_fds_fields.empend("Can read", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_deprecated("can_read"sv).to_bool() ? "Yes" : "No";
|
||||
return object.get_bool("can_read"sv).value_or(false) ? "Yes" : "No";
|
||||
});
|
||||
pid_fds_fields.empend("Can write", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_deprecated("can_write"sv).to_bool() ? "Yes" : "No";
|
||||
return object.get_bool("can_write"sv).value_or(false) ? "Yes" : "No";
|
||||
});
|
||||
|
||||
m_model = GUI::JsonArrayModel::create({}, move(pid_fds_fields));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue