summaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-mobile-helper.cpp')
-rw-r--r--subsurface-mobile-helper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp
index 9d9875ead..4956a112d 100644
--- a/subsurface-mobile-helper.cpp
+++ b/subsurface-mobile-helper.cpp
@@ -17,6 +17,7 @@
#include <QSortFilterProxyModel>
#include "qt-mobile/qmlmanager.h"
#include "qt-models/divelistmodel.h"
+#include "qt-models/gpslistmodel.h"
#include "qt-mobile/qmlprofile.h"
QObject *qqWindowObject = NULL;
@@ -51,8 +52,15 @@ void run_ui()
sortModel->setDynamicSortFilter(true);
sortModel->setSortRole(DiveListModel::DiveDateRole);
sortModel->sort(0, Qt::DescendingOrder);
+ GpsListModel gpsListModel;
+ QSortFilterProxyModel *gpsSortModel = new QSortFilterProxyModel(0);
+ gpsSortModel->setSourceModel(&gpsListModel);
+ gpsSortModel->setDynamicSortFilter(true);
+ gpsSortModel->setSortRole(GpsListModel::GpsDateRole);
+ gpsSortModel->sort(0, Qt::DescendingOrder);
QQmlContext *ctxt = engine.rootContext();
ctxt->setContextProperty("diveModel", sortModel);
+ ctxt->setContextProperty("gpsModel", gpsSortModel);
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
qqWindowObject = engine.rootObjects().value(0);
if (!qqWindowObject) {