From 0f417a3bc1f282b34509df1c9295197522344a55 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 9 Dec 2019 15:25:16 +0100 Subject: Dive list: access header via filter-model The dive list accesses the filter model, therefore it makes sense to also get the header data from there, even if they are only forwarded from the source model. This makes control flow more logical and will allow us to remove the global DiveTripModel instance. Signed-off-by: Berthold Stoeger --- desktop-widgets/divelistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 76fa8fbd8..dd74bd46b 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -93,7 +93,7 @@ void DiveListView::calculateInitialColumnWidth(int col) int em = metrics.width('m'); int zw = metrics.width('0'); - QString header_txt = DiveTripModelBase::instance()->headerData(col, Qt::Horizontal, Qt::DisplayRole).toString(); + QString header_txt = MultiFilterSortModel::instance()->headerData(col, Qt::Horizontal, Qt::DisplayRole).toString(); int width = metrics.width(header_txt); int sw = 0; switch (col) { -- cgit v1.2.3-70-g09d2