From 7387b10b2944c0126999a3911d6ecf705d243a8b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 11 Mar 2020 22:21:18 +0100 Subject: 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 --- qt-models/divetripmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-models/divetripmodel.cpp') 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 &divesIn, dive *current) +void DiveTripModelTree::divesSelected(const QVector &divesIn) { QVector 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 &divesIn, dive *current) +void DiveTripModelList::divesSelected(const QVector &divesIn) { QVector dives = visibleDives(divesIn); -- cgit v1.2.3-70-g09d2