diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-11 22:21:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-12 07:09:01 -0700 |
commit | 7387b10b2944c0126999a3911d6ecf705d243a8b (patch) | |
tree | 7eaac6f3d6b3bb4ad7fc1ce28b25628d2ede0236 /qt-models | |
parent | 950ae951bcc948ee632946757e43fca8ce7400fe (diff) | |
download | subsurface-7387b10b2944c0126999a3911d6ecf705d243a8b.tar.gz |
cleanup: remove current_dive parameter from divesSelected signal
The diveListNotifier.divesSelected() signal is used to inform the
models of a selection change. It sent the current dive as a second
parameter. This is redundant, because the only sender of the signal
sets current_dive just before sending the signal. Remove the
parameter, which appears to be an artifact.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divetripmodel.cpp | 6 | ||||
-rw-r--r-- | qt-models/divetripmodel.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 4236b32c3..453a93c1e 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -475,7 +475,7 @@ void DiveTripModelBase::clear() clear_dive_file_data(); clearData(); oldCurrent = nullptr; - emit diveListNotifier.divesSelected({}, nullptr); // Inform profile, etc of changed selection + emit diveListNotifier.divesSelected({}); // Inform profile, etc of changed selection endResetModel(); emit diveListNotifier.numShownChanged(); } @@ -1404,7 +1404,7 @@ QModelIndex DiveTripModelTree::diveToIdx(const dive *d) const } } -void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn, dive *current) +void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn) { QVector <dive *> dives = visibleDives(divesIn); @@ -1664,7 +1664,7 @@ QModelIndex DiveTripModelList::diveToIdx(const dive *d) const return createIndex(it - items.begin(), 0); } -void DiveTripModelList::divesSelected(const QVector<dive *> &divesIn, dive *current) +void DiveTripModelList::divesSelected(const QVector<dive *> &divesIn) { QVector<dive *> dives = visibleDives(divesIn); diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h index 4be678e27..97000aa23 100644 --- a/qt-models/divetripmodel.h +++ b/qt-models/divetripmodel.h @@ -113,7 +113,7 @@ public slots: void diveSiteChanged(dive_site *ds, int field); void divesChanged(const QVector<dive *> &dives); void divesTimeChanged(timestamp_t delta, const QVector<dive *> &dives); - void divesSelected(const QVector<dive *> &dives, dive *current); + void divesSelected(const QVector<dive *> &dives); void tripChanged(dive_trip *trip, TripField); void filterReset(); @@ -190,7 +190,7 @@ public slots: void divesTimeChanged(timestamp_t delta, const QVector<dive *> &dives); // Does nothing in list view. //void divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector<dive *> &dives); - void divesSelected(const QVector<dive *> &dives, dive *current); + void divesSelected(const QVector<dive *> &dives); void filterReset(); public: |