1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14:58 +00:00

LibGUI+Userland: Propagate errors in Model::column_name()

This commit is contained in:
Sam Atkins 2023-06-13 16:30:15 +01:00 committed by Andreas Kling
parent 94bcb5bea8
commit f33824d2e9
73 changed files with 140 additions and 146 deletions

View file

@ -35,7 +35,7 @@ int StorageModel::row_count(GUI::ModelIndex const& index) const
return 0;
}
String StorageModel::column_name(int column) const
ErrorOr<String> StorageModel::column_name(int column) const
{
switch (column) {
case Column::Key:
@ -43,10 +43,10 @@ String StorageModel::column_name(int column) const
case Column::Value:
return "Value"_short_string;
case Column::__Count:
return {};
return String {};
}
return {};
return String {};
}
GUI::ModelIndex StorageModel::index(int row, int column, GUI::ModelIndex const&) const