mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
be763452ad
commit
f8c5c8bedf
4 changed files with 31 additions and 32 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue