mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: replace clear()/addAllDives() pairs by reload()
The clear()/addAllDives() pair was bogus as the former didn't clear the model (this is not possible anymore - the model represents the core dive list) and the latter readded all dives again. Replace this by a reload() function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
57b77c90b9
commit
0026aa3955
4 changed files with 12 additions and 38 deletions
|
@ -13,7 +13,7 @@ class DiveListSortModel : public QSortFilterProxyModel
|
|||
public:
|
||||
DiveListSortModel(QObject *parent = 0);
|
||||
void setSourceModel(QAbstractItemModel *sourceModel);
|
||||
Q_INVOKABLE void clear();
|
||||
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);
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
void removeDive(int i);
|
||||
void removeDiveById(int id);
|
||||
void updateDive(int i, dive *d);
|
||||
void clear();
|
||||
void reload();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int getDiveIdx(int id) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue