diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-13 08:19:04 +0200 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-09-14 13:20:59 +0200 |
commit | f8c5c8bedf9c0af8f031da7fc74c516a40e9e1c6 (patch) | |
tree | 92c557ab1de0506e1e0a33bc2ab22738e17393e4 /qt-models/divelistmodel.h | |
parent | be763452adc110cfcc011322d989698d897dd6ed (diff) | |
download | subsurface-f8c5c8bedf9c0af8f031da7fc74c516a40e9e1c6.tar.gz |
Mobile: Generate DiveObjectHelpers on the fly
Instead of keeping track of a list of DiveObjectHelpers, generate
them on-the-fly in DiveListModel. Thus, there is less danger of
model and core getting out of sync. On the flip-side, now the
DiveListModel and the DiveListSortModel might get out of sync.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelistmodel.h')
-rw-r--r-- | qt-models/divelistmodel.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index adda8b127..65c117212 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -62,9 +62,8 @@ public: QHash<int, QByteArray> roleNames() const; QString startAddDive(); void resetInternalData(); - Q_INVOKABLE DiveObjectHelper* at(int i); + Q_INVOKABLE DiveObjectHelper at(int i); private: - QList<DiveObjectHelper*> m_dives; static DiveListModel *m_instance; }; |