mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: Map directly from source in DiveListSortModel::getIdxForId()
Instead of looping over all dives and search the dive with the given id, let the source model determine the index and map that. Thus, we do only one mapping and don't generate a ton of DiveObjectHelpers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
62f1a92068
commit
20e847f9d8
2 changed files with 16 additions and 7 deletions
|
@ -58,6 +58,7 @@ public:
|
|||
struct dive *getDive(int i);
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int getDiveIdx(int id) const;
|
||||
QModelIndex getDiveQIdx(int id);
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
QString startAddDive();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue