mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: initialize DiveListSortModel in constructor
The model was initialized in the global run_ui() function. Move that into the constructor of the class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a30e6b306f
commit
2560734624
2 changed files with 6 additions and 5 deletions
|
@ -99,11 +99,6 @@ void run_ui()
|
|||
DiveListModel diveListModel;
|
||||
LOG_STP("run_ui diveListModel started");
|
||||
DiveListSortModel *sortModel = new DiveListSortModel(0);
|
||||
sortModel->setSourceModel(&diveListModel);
|
||||
sortModel->setDynamicSortFilter(true);
|
||||
sortModel->setSortRole(DiveListModel::DiveDateRole);
|
||||
sortModel->sort(0, Qt::DescendingOrder);
|
||||
LOG_STP("run_ui diveListModel sorted");
|
||||
GpsListModel gpsListModel;
|
||||
QSortFilterProxyModel *gpsSortModel = new QSortFilterProxyModel(nullptr);
|
||||
gpsSortModel->setSourceModel(&gpsListModel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue