Cleanup: remove MapLocationModel::isSelected() function

That function was replaced by a model-attribute.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-08-31 23:29:20 +02:00 committed by Dirk Hohndel
parent 1d01fff006
commit 773604f0df
2 changed files with 0 additions and 9 deletions

View file

@ -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;

View file

@ -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;