From c4fb42f8ad5827619c72e7c7d8f75d247c08ae68 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 11 Mar 2016 07:26:42 -0800 Subject: [PATCH] QML UI: sort GPS fixes correctly That was silly. We have the GpsWhenRole specificly for sorting and then didn't use it. Signed-off-by: Dirk Hohndel --- subsurface-mobile-helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index 788ba3b4d..214d65e79 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -57,7 +57,7 @@ void run_ui() QSortFilterProxyModel *gpsSortModel = new QSortFilterProxyModel(0); gpsSortModel->setSourceModel(&gpsListModel); gpsSortModel->setDynamicSortFilter(true); - gpsSortModel->setSortRole(GpsListModel::GpsDateRole); + gpsSortModel->setSortRole(GpsListModel::GpsWhenRole); gpsSortModel->sort(0, Qt::DescendingOrder); QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("diveModel", sortModel);