diff options
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 2 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 1 | ||||
-rw-r--r-- | qt-models/mobilelistmodel.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index a9ff4e8d6..db78f1de6 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -50,7 +50,7 @@ Kirigami.ScrollablePage { if (isTrip) { manager.appendTextToLog("clicked on trip " + tripTitle) // toggle expand (backend to deal with unexpand other trip) - manager.toggle(model.row); + diveModel.toggle(model.row); } else { manager.appendTextToLog("clicked on dive") if (detailsWindow.state === "view") { diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 78bdb84d8..81f203bdb 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -24,6 +24,7 @@ #include "qt-models/completionmodels.h" #include "qt-models/messagehandlermodel.h" #include "qt-models/tankinfomodel.h" +#include "qt-models/mobilelistmodel.h" #include "core/device.h" #include "core/errorhelper.h" #include "core/file.h" diff --git a/qt-models/mobilelistmodel.h b/qt-models/mobilelistmodel.h index 01bec8670..ab0026f32 100644 --- a/qt-models/mobilelistmodel.h +++ b/qt-models/mobilelistmodel.h @@ -49,7 +49,7 @@ public: void resetModel(); void expand(int row); void unexpand(); - void toggle(int row); + Q_INVOKABLE void toggle(int row); Q_PROPERTY(int shown READ shown NOTIFY shownChanged); signals: void shownChanged(); |