From 0fc82e33987ec982d6a49440dcc28e17782d6ed7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 5 Dec 2019 22:36:09 +0100 Subject: [PATCH] mobile/divelist: switch to the correct model This obviously breaks everything, but now we can start fixing things. Signed-off-by: Berthold Stoeger Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 2 +- subsurface-helper.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index db78f1de6..0aa3772e7 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -13,7 +13,7 @@ Kirigami.ScrollablePage { title: qsTr("Dive list") verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1 - property QtObject diveListModel: mobileListModel + property QtObject diveListModel: diveModel supportsRefreshing: true onRefreshingChanged: { diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index fb997290b..d230eacb8 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -103,9 +103,8 @@ void run_ui() gpsSortModel->setSortRole(GpsListModel::GpsWhenRole); gpsSortModel->sort(0, Qt::DescendingOrder); QQmlContext *ctxt = engine.rootContext(); - ctxt->setContextProperty("diveModel", DiveListSortModel::instance()); MobileListModel *mlm(MobileListModel::instance()); - ctxt->setContextProperty("mobileListModel", mlm); + ctxt->setContextProperty("diveModel", mlm); ctxt->setContextProperty("gpsModel", gpsSortModel); ctxt->setContextProperty("vendorList", vendorList); set_non_bt_addresses();