From 33b8cf8a3694158a99ec74c4abde1cb53cd32356 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 10 Feb 2020 21:59:51 +0100 Subject: Cleanup: remove filterSelectedDives function in divetripmodel.cpp The last users of the returned vector were removed in commit e1abf9485cf59f1b8cb79d827fa386af48f095a4 Signed-off-by: Berthold Stoeger --- qt-models/divetripmodel.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'qt-models/divetripmodel.cpp') diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 1cbc1932e..66274cbec 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -1137,16 +1137,6 @@ void DiveTripModelTree::tripChanged(dive_trip *trip, TripField) dataChanged(createIndex(idx, 0, noParent), createIndex(idx, COLUMNS - 1, noParent)); } -static QVector filterSelectedDives(const QVector &dives) -{ - QVector res; - res.reserve(dives.size()); - for (dive *d: dives) - if (d->selected) - res.append(d); - return res; -} - void DiveTripModelTree::divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector &dives) { // Move dives between trips. This is an "interesting" problem, as we might @@ -1163,7 +1153,6 @@ void DiveTripModelTree::divesMovedBetweenTrips(dive_trip *from, dive_trip *to, b // Cheating! // Unfortunately, removing the dives means that their selection is lost. // Thus, remember the selection and re-add it later. - QVector selectedDives = filterSelectedDives(dives); divesAdded(to, createTo, dives); divesDeleted(from, deleteFrom, dives); } @@ -1186,7 +1175,6 @@ void DiveTripModelTree::divesTimeChangedTrip(dive_trip *trip, timestamp_t delta, // Cheating! // Unfortunately, removing the dives means that their selection is lost. // Thus, remember the selection and re-add it later. - QVector selectedDives = filterSelectedDives(dives); divesDeleted(trip, false, dives); divesAdded(trip, false, dives); } @@ -1451,7 +1439,6 @@ void DiveTripModelList::divesTimeChanged(timestamp_t delta, const QVector selectedDives = filterSelectedDives(dives); divesDeleted(nullptr, false, dives); divesAdded(nullptr, false, dives); } -- cgit v1.2.3-70-g09d2