summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor/main.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-12-24 12:12:04 +0000
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-24 05:11:52 -0800
commitf6633a1026a2e6080ea0c66d79e8bd69e9dd418b (patch)
tree99d035e16245e334af2acf966f07c7c01c777c9e /Userland/Applications/SystemMonitor/main.cpp
parentc72a996542001ef8424661c676e693a161186ddf (diff)
downloadserenity-f6633a1026a2e6080ea0c66d79e8bd69e9dd418b.zip
LibGUI+Userland: Make SortingProxyModel::create() return ErrorOr
Unfortunately, most of the users are inside constructors, (and two others are inside callback lambdas) so the error can't propagate, but that can be improved later.
Diffstat (limited to 'Userland/Applications/SystemMonitor/main.cpp')
-rw-r--r--Userland/Applications/SystemMonitor/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp
index 1c4bb5ed01..cf1b61b604 100644
--- a/Userland/Applications/SystemMonitor/main.cpp
+++ b/Userland/Applications/SystemMonitor/main.cpp
@@ -180,7 +180,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto& process_table_view = process_table_container.add<GUI::TableView>();
process_table_view.set_column_headers_visible(true);
- process_table_view.set_model(GUI::SortingProxyModel::create(process_model));
+ process_table_view.set_model(TRY(GUI::SortingProxyModel::create(process_model)));
for (auto column = 0; column < ProcessModel::Column::__Count; ++column)
process_table_view.set_column_visible(column, false);
process_table_view.set_column_visible(ProcessModel::Column::Icon, true);
@@ -549,7 +549,7 @@ NonnullRefPtr<GUI::Widget> build_storage_widget()
df_fields.empend("total_inode_count", "Total inodes", Gfx::TextAlignment::CenterRight);
df_fields.empend("block_size", "Block size", Gfx::TextAlignment::CenterRight);
- fs_table_view.set_model(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/df", move(df_fields))));
+ fs_table_view.set_model(MUST(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/df", move(df_fields)))));
fs_table_view.set_column_painting_delegate(3, make<ProgressbarPaintingDelegate>());
@@ -647,7 +647,7 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
return String::formatted("{:02x}", revision_id);
});
- pci_table_view.set_model(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/pci", move(pci_fields))));
+ pci_table_view.set_model(MUST(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/pci", move(pci_fields)))));
pci_table_view.model()->invalidate();
}
};