diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-09-14 19:58:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-21 16:12:23 -0700 |
commit | 9322c54b6a1e1bb85954b106be5410e413a05c14 (patch) | |
tree | 3d2c4c5ea65bfa6c4bc4f68baa6f37d773117dc7 /qt-models/divelistmodel.h | |
parent | ce751bd6963d13c23f554da4e5fc66ee0d74eb1f (diff) | |
download | subsurface-9322c54b6a1e1bb85954b106be5410e413a05c14.tar.gz |
Mobile: pass section directly to tripTitle() and tripShortDate()
Instead of converting the section-heading string to a trip-pointer
in QML and pass that to the tripTitle() and tripShortDate()
functions, pass the string and convert in C++ code.
Hopefully, this makes the code more robust.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelistmodel.h')
-rw-r--r-- | qt-models/divelistmodel.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index c355aceaf..d6eb07463 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -14,9 +14,8 @@ public: DiveListSortModel(QObject *parent = 0); void setSourceModel(QAbstractItemModel *sourceModel); Q_INVOKABLE void reload(); - Q_INVOKABLE QVariant tripIdToObject(const QString &s); - Q_INVOKABLE QString tripTitle(const QVariant &trip); - Q_INVOKABLE QString tripShortDate(const QVariant &trip); + Q_INVOKABLE QString tripTitle(const QString &trip); + Q_INVOKABLE QString tripShortDate(const QString &trip); public slots: int getIdxForId(int id); void setFilter(QString f); |