1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +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

@ -673,7 +673,7 @@ void TreeView::auto_resize_column(int column)
auto& model = *this->model();
int header_width = column_header().font().width(model.column_name(column));
int header_width = column_header().font().width(model.column_name(column).release_value_but_fixme_should_propagate_errors());
if (column == m_key_column && model.is_column_sortable(column))
header_width += HeaderView::sorting_arrow_width + HeaderView::sorting_arrow_offset;
int column_width = header_width;
@ -718,7 +718,7 @@ void TreeView::update_column_sizes()
continue;
if (!column_header().is_section_visible(column))
continue;
int header_width = column_header().font().width(model.column_name(column));
int header_width = column_header().font().width(model.column_name(column).release_value_but_fixme_should_propagate_errors());
if (column == m_key_column && model.is_column_sortable(column))
header_width += HeaderView::sorting_arrow_width + HeaderView::sorting_arrow_offset;
int column_width = header_width;
@ -739,7 +739,7 @@ void TreeView::update_column_sizes()
set_column_width(column, max(this->column_width(column), column_width));
}
int tree_column_header_width = column_header().font().width(model.column_name(tree_column));
int tree_column_header_width = column_header().font().width(model.column_name(tree_column).release_value_but_fixme_should_propagate_errors());
if (tree_column == m_key_column && model.is_column_sortable(tree_column))
tree_column_header_width += HeaderView::sorting_arrow_width + HeaderView::sorting_arrow_offset;
int tree_column_width = tree_column_header_width;