diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-10 15:06:29 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-10 15:06:29 +0200 |
commit | afd25679bc4e72db304322289af0566bde0b60b0 (patch) | |
tree | eae26f3fdb93882e38e66b7d1838c11e77b58428 /Applications | |
parent | a4548a150f339156c05455a11a66c6e8c8888e7c (diff) | |
download | serenity-afd25679bc4e72db304322289af0566bde0b60b0.zip |
GJsonArrayModel: Support fields that aren't tied to a single JSON value
Change the custom data massaging callback to take a const JsonObject&.
This will allow binding together data from multiple fields into one
output in the model. :^)
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/ProcessManager/ProcessFileDescriptorMapWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Applications/ProcessManager/ProcessFileDescriptorMapWidget.cpp b/Applications/ProcessManager/ProcessFileDescriptorMapWidget.cpp index 6dab95dedd..bcc461ede8 100644 --- a/Applications/ProcessManager/ProcessFileDescriptorMapWidget.cpp +++ b/Applications/ProcessManager/ProcessFileDescriptorMapWidget.cpp @@ -16,8 +16,8 @@ ProcessFileDescriptorMapWidget::ProcessFileDescriptorMapWidget(GWidget* parent) pid_fds_fields.empend("class", "Class", TextAlignment::CenterLeft); pid_fds_fields.empend("offset", "Offset", TextAlignment::CenterRight); pid_fds_fields.empend("absolute_path", "Path", TextAlignment::CenterLeft); - pid_fds_fields.empend("seekable", "Access", TextAlignment::CenterLeft, [](auto& data) { - return data.to_bool() ? "Seekable" : "Sequential"; + pid_fds_fields.empend("Access", TextAlignment::CenterLeft, [](auto& object) { + return object.get("seekable").to_bool() ? "Seekable" : "Sequential"; }); m_table_view->set_model(GJsonArrayModel::create({}, move(pid_fds_fields))); |