aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-06 12:21:14 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-10 02:37:03 +0900
commit57f5d4b7843da573c6c254d6f023270fddaf8e5c (patch)
tree2839ac39d62c12f26bfc25df8bf8fa0bf374f013 /commands
parentc3614040d94051d4d6702bbf02239e055de8da67 (diff)
downloadsubsurface-57f5d4b7843da573c6c254d6f023270fddaf8e5c.tar.gz
code cleanup: replace deprecated fromStdVector() method
Replacement was only introduced in Qt 5.14 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'commands')
-rw-r--r--commands/command_edit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp
index 89e10b000..02939ac6d 100644
--- a/commands/command_edit.cpp
+++ b/commands/command_edit.cpp
@@ -112,7 +112,11 @@ void EditBase<T>::undo()
// Send signals.
DiveField id = fieldId();
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ emit diveListNotifier.divesChanged(QVector<dive *>(dives.begin(), dives.end()), id);
+#else
emit diveListNotifier.divesChanged(QVector<dive *>::fromStdVector(dives), id);
+#endif
setSelection(selectedDives, current);
}
@@ -679,7 +683,11 @@ void EditTagsBase::undo()
// Send signals.
DiveField id = fieldId();
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ emit diveListNotifier.divesChanged(QVector<dive *>(dives.begin(), dives.end()), id);
+#else
emit diveListNotifier.divesChanged(QVector<dive *>::fromStdVector(dives), id);
+#endif
setSelection(selectedDives, current);
}