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
|
@ -3,11 +3,17 @@
|
|||
#include "core/qthelper.h"
|
||||
#include "core/trip.h"
|
||||
#include "core/settings/qPrefGeneral.h"
|
||||
#include "core/ssrf.h" // for LOG_STP
|
||||
#include <QDateTime>
|
||||
|
||||
DiveListSortModel::DiveListSortModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
setSourceModel(DiveListModel::instance());
|
||||
setDynamicSortFilter(true);
|
||||
setSortRole(DiveListModel::DiveDateRole);
|
||||
sort(0, Qt::DescendingOrder);
|
||||
updateFilterState();
|
||||
LOG_STP("run_ui diveListModel sorted");
|
||||
}
|
||||
|
||||
void DiveListSortModel::updateFilterState()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue