diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-31 23:29:20 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-06 11:48:47 -0700 |
commit | 773604f0dfdbf3be8a3fcb3e78abfa889805bf07 (patch) | |
tree | 8ffb791a93ed6188868a8077673b0b1f6910550e /qt-models | |
parent | 1d01fff0061bde6260259a9a2b46f80a31ad1218 (diff) | |
download | subsurface-773604f0dfdbf3be8a3fcb3e78abfa889805bf07.tar.gz |
Cleanup: remove MapLocationModel::isSelected() function
That function was replaced by a model-attribute.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/maplocationmodel.cpp | 6 | ||||
-rw-r--r-- | qt-models/maplocationmodel.h | 3 |
2 files changed, 0 insertions, 9 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index 3aad02980..d1e9c12aa 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -236,12 +236,6 @@ void MapLocationModel::setSelected(const QVector<dive_site *> &divesites) m_selectedDs = divesites; } -bool MapLocationModel::isSelected(const QVariant &dsVariant) const -{ - dive_site *ds = dsVariant.value<dive_site *>(); - return ds && m_selectedDs.contains(ds); -} - MapLocation *MapLocationModel::getMapLocation(const struct dive_site *ds) { MapLocation *location; diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h index 05a772bcf..ddf0a4a11 100644 --- a/qt-models/maplocationmodel.h +++ b/qt-models/maplocationmodel.h @@ -69,9 +69,6 @@ public: MapLocation *getMapLocation(const struct dive_site *ds); const QVector<dive_site *> &selectedDs() const; Q_INVOKABLE void setSelected(struct dive_site *ds); - // The dive site is passed as a QVariant, because a null-QVariant is not automatically - // transformed into a null pointer and warning messages are spewed onto the console. - Q_INVOKABLE bool isSelected(const QVariant &ds) const; protected: QHash<int, QByteArray> roleNames() const override; |