summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-19 18:20:50 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-20 21:23:16 -0700
commit879f52180c077e924c7e44eb4c38017606df2834 (patch)
tree6979cb524a8f5ae5aaa1d202690872256a66b483 /qt-models
parent0bc96905bf92de5e7bac88efde181d93d95998f1 (diff)
downloadsubsurface-879f52180c077e924c7e44eb4c38017606df2834.tar.gz
Cleanup: fix a few comments and debug messages
This is just minor fixes that are not user-visible: Fix a few erroneous comments and a debug message. These are copy & paste mistakes and mistakes introduced during code- refactoring. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divetripmodel.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index dd871d80d..59069164f 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -733,8 +733,6 @@ void DiveTripModelTree::addDivesToTrip(int trip, const QVector<dive *> &dives)
// Construct the parent index, ie. the index of the trip.
QModelIndex parent = createIndex(trip, 0, noParent);
- // Either this is outside of a trip or we're in list mode.
- // Thus, add dives at the top-level in batches
addInBatches(items[trip].dives, dives,
[](dive *d, dive *d2) { return dive_less_than(d, d2); }, // comp
[&](std::vector<dive *> &items, const QVector<dive *> &dives, int idx, int from, int to) { // inserter
@@ -1061,7 +1059,7 @@ void DiveTripModelTree::currentDiveChanged()
int diveIdx = findDiveInTrip(idx, current_dive);
if (diveIdx < 0) {
// We don't know this dive. Something is wrong. Warn and bail.
- qWarning() << "DiveTripModelTree::currentDiveChanged(): unknown top-level dive";
+ qWarning() << "DiveTripModelTree::currentDiveChanged(): unknown dive";
emit newCurrentDive(QModelIndex());
return;
}
@@ -1226,7 +1224,6 @@ void DiveTripModelList::currentDiveChanged()
return;
}
- // Either this is outside of a trip or we're in list mode.
auto it = std::find(items.begin(), items.end(), current_dive);
if (it == items.end()) {
// We don't know this dive. Something is wrong. Warn and bail.