diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-24 15:05:35 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | 86f384f932ae04ab17dabadda81d845069f963d7 (patch) | |
tree | 7f0bf868e52cacf27a1e88e7be61a4428f95c75c /qt-models/divetripmodel.cpp | |
parent | ae753f4c4d9368f5e44ca5c14cbe6bc01775c48e (diff) | |
download | subsurface-86f384f932ae04ab17dabadda81d845069f963d7.tar.gz |
Cleanup: rename newCurrentDive signal to currentDiveChanged
This is more consistent with the rest of the signals.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index f75e37c7c..04af9c47f 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -1185,7 +1185,7 @@ void DiveTripModelTree::divesSelected(const QVector<dive *> &dives, dive *curren // The current dive has changed. Transform the current dive into an index and pass it on to the view. if (!current) { - emit newCurrentDive(QModelIndex()); // No current dive -> tell view to clear current index with an invalid index + emit currentDiveChanged(QModelIndex()); // No current dive -> tell view to clear current index with an invalid index return; } @@ -1196,26 +1196,26 @@ void DiveTripModelTree::divesSelected(const QVector<dive *> &dives, dive *curren if (idx < 0) { // We don't know this dive. Something is wrong. Warn and bail. qWarning() << "DiveTripModelTree::diveSelected(): unknown top-level dive"; - emit newCurrentDive(QModelIndex()); + emit currentDiveChanged(QModelIndex()); return; } - emit newCurrentDive(createIndex(idx, 0, noParent)); + emit currentDiveChanged(createIndex(idx, 0, noParent)); } else { int idx = findTripIdx(trip); if (idx < 0) { // We don't know the trip - this shouldn't happen. Warn and bail. qWarning() << "DiveTripModelTree::diveSelected(): unknown trip"; - emit newCurrentDive(QModelIndex()); + emit currentDiveChanged(QModelIndex()); return; } int diveIdx = findDiveInTrip(idx, current); if (diveIdx < 0) { // We don't know this dive. Something is wrong. Warn and bail. qWarning() << "DiveTripModelTree::diveSelected(): unknown dive"; - emit newCurrentDive(QModelIndex()); + emit currentDiveChanged(QModelIndex()); return; } - emit newCurrentDive(createIndex(diveIdx, 0, idx)); + emit currentDiveChanged(createIndex(diveIdx, 0, idx)); } } @@ -1443,7 +1443,7 @@ void DiveTripModelList::divesSelected(const QVector<dive *> &dives, dive *curren // Transform the current dive into an index and pass it on to the view. if (!current) { - emit newCurrentDive(QModelIndex()); // No current dive -> tell view to clear current index with an invalid index + emit currentDiveChanged(QModelIndex()); // No current dive -> tell view to clear current index with an invalid index return; } @@ -1451,10 +1451,10 @@ void DiveTripModelList::divesSelected(const QVector<dive *> &dives, dive *curren if (it == items.end()) { // We don't know this dive. Something is wrong. Warn and bail. qWarning() << "DiveTripModelList::divesSelected(): unknown dive"; - emit newCurrentDive(QModelIndex()); + emit currentDiveChanged(QModelIndex()); return; } - emit newCurrentDive(createIndex(it - items.begin(), 0)); + emit currentDiveChanged(createIndex(it - items.begin(), 0)); } // Simple sorting helper for sorting against a criterium and if |