Cleanup: remove MapWidgetHelper::m_selectedDiveIds member

This member variable was only used locally in functions.
Accordingly, make it a function-local variable.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-05-02 22:41:24 +02:00 committed by Dirk Hohndel
parent 79f3000630
commit 48b8129137
4 changed files with 20 additions and 22 deletions

View file

@ -48,8 +48,7 @@ void MapWidget::doneLoading(QQuickWidget::Status status)
isReady = true;
m_rootItem = qobject_cast<QQuickItem *>(rootObject());
m_mapHelper = rootObject()->findChild<MapWidgetHelper *>();
connect(m_mapHelper, SIGNAL(selectedDivesChanged(QList<int>)),
this, SLOT(selectedDivesChanged(QList<int>)));
connect(m_mapHelper, &MapWidgetHelper::selectedDivesChanged, this, &MapWidget::selectedDivesChanged);
connect(m_mapHelper, &MapWidgetHelper::coordinatesChanged, this, &MapWidget::coordinatesChanged);
}
@ -108,7 +107,7 @@ void MapWidget::prepareForGetDiveCoordinates(struct dive_site *ds)
skipReload = true;
}
void MapWidget::selectedDivesChanged(QList<int> list)
void MapWidget::selectedDivesChanged(const QList<int> &list)
{
CHECK_IS_READY_RETURN_VOID();
skipReload = true;

View file

@ -31,7 +31,7 @@ public slots:
void endGetDiveCoordinates();
void repopulateLabels();
void prepareForGetDiveCoordinates(struct dive_site *ds);
void selectedDivesChanged(QList<int>);
void selectedDivesChanged(const QList<int> &);
void coordinatesChanged(struct dive_site *ds, const location_t &);
void doneLoading(QQuickWidget::Status status);
void diveSiteChanged(struct dive_site *ds, int field);