mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:37:44 +00:00
LibGUI+Userland: Propagate errors in Model::column_name()
This commit is contained in:
parent
94bcb5bea8
commit
f33824d2e9
73 changed files with 140 additions and 146 deletions
|
@ -17,17 +17,17 @@ NonnullRefPtr<PartitionModel> PartitionModel::create()
|
|||
return adopt_ref(*new PartitionModel);
|
||||
}
|
||||
|
||||
String PartitionModel::column_name(int column) const
|
||||
ErrorOr<String> PartitionModel::column_name(int column) const
|
||||
{
|
||||
switch (column) {
|
||||
case Column::Partition:
|
||||
return "Partition"_string.release_value_but_fixme_should_propagate_errors();
|
||||
return TRY("Partition"_string);
|
||||
case Column::StartBlock:
|
||||
return "Start Block"_string.release_value_but_fixme_should_propagate_errors();
|
||||
return TRY("Start Block"_string);
|
||||
case Column::EndBlock:
|
||||
return "End Block"_string.release_value_but_fixme_should_propagate_errors();
|
||||
return TRY("End Block"_string);
|
||||
case Column::TotalBlocks:
|
||||
return "Total Blocks"_string.release_value_but_fixme_should_propagate_errors();
|
||||
return TRY("Total Blocks"_string);
|
||||
case Column::Size:
|
||||
return "Size"_short_string;
|
||||
default:
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return m_partition_table->partitions_count(); }
|
||||
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
|
||||
virtual String column_name(int) const override;
|
||||
virtual ErrorOr<String> column_name(int) const override;
|
||||
virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
|
||||
|
||||
ErrorOr<void> set_device_path(DeprecatedString const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue