diff --git a/src/commands/undohelper.cpp b/src/commands/undohelper.cpp index 27836d0ffd..5948ec1c3c 100644 --- a/src/commands/undohelper.cpp +++ b/src/commands/undohelper.cpp @@ -310,7 +310,7 @@ void UndoHelper::debugPrintState() void UndoHelper::restoreAffectedTracks() { // Remove everything in the affected tracks. - for (const auto &trackIndex : qAsConst(m_affectedTracks)) { + for (const auto &trackIndex : std::as_const(m_affectedTracks)) { if (trackIndex >= 0 && trackIndex < m_model.trackList().size()) { auto mlt_index = m_model.trackList().at(trackIndex).mlt_index; Mlt::Producer producer = m_model.tractor()->multitrack()->track(mlt_index); @@ -324,7 +324,7 @@ void UndoHelper::restoreAffectedTracks() } } - for (const auto &uid : qAsConst(m_insertedOrder)) { + for (const auto &uid : std::as_const(m_insertedOrder)) { const Info &info = m_state[uid]; if (m_affectedTracks.contains(info.oldTrackIndex)) { UNDOLOG << "Handling uid" << uid << "on track" << info.oldTrackIndex << "index" << @@ -359,7 +359,7 @@ void UndoHelper::restoreAffectedTracks() AudioLevelsTask::start(clip->parent(), &m_model, modelIndex); } } - for (const auto &trackIndex : qAsConst(m_affectedTracks)) { + for (const auto &trackIndex : std::as_const(m_affectedTracks)) { if (trackIndex >= 0 && trackIndex < m_model.trackList().size()) { auto mlt_index = m_model.trackList().at(trackIndex).mlt_index; Mlt::Producer producer = m_model.tractor()->multitrack()->track(mlt_index); diff --git a/src/models/actionsmodel.cpp b/src/models/actionsmodel.cpp index f0e534d736..f0c1f58bd9 100644 --- a/src/models/actionsmodel.cpp +++ b/src/models/actionsmodel.cpp @@ -179,7 +179,7 @@ bool ActionsModel::setData(const QModelIndex &index, const QVariant &value, int QAction *action = m_actions[index.row()]; if (!ks.isEmpty()) { - for (const auto a : qAsConst(m_actions)) { + for (const auto a : std::as_const(m_actions)) { QList sequences = a->shortcuts(); for (int i = 0; i < sequences.size(); i++) { if (sequences[i] == ks) { diff --git a/src/models/markersmodel.cpp b/src/models/markersmodel.cpp index 33d18656ce..72c99d199a 100644 --- a/src/models/markersmodel.cpp +++ b/src/models/markersmodel.cpp @@ -328,7 +328,7 @@ void MarkersModel::doShift(int shiftPosition, int shiftAmount) int maxIndex = -1; QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer markerProperties(markerList->get_props(qUtf8Printable( QString::number(i)))); if (markerProperties && markerProperties->is_valid()) { @@ -455,7 +455,7 @@ int MarkersModel::markerIndexForPosition(int position) { QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { if (position == m_producer->time_to_frames(marker->get("start")) || @@ -471,7 +471,7 @@ int MarkersModel::markerIndexForRange(int start, int end) { QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { if (start == m_producer->time_to_frames(marker->get("start")) && @@ -492,7 +492,7 @@ int MarkersModel::nextMarkerPosition(int position) } QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { int markerPosition = m_producer->time_to_frames(marker->get("start")); @@ -518,7 +518,7 @@ int MarkersModel::prevMarkerPosition(int position) } QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { int markerPosition = m_producer->time_to_frames(marker->get("start")); @@ -545,7 +545,7 @@ QMap MarkersModel::ranges() QMap result; QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { Markers::Marker m; @@ -571,7 +571,7 @@ QList MarkersModel::getMarkers() const return markers; QScopedPointer markerList(m_producer->get_props(kShotcutMarkersProperty)); if (markerList && markerList->is_valid()) { - for (const auto i : qAsConst(m_keys)) { + for (const auto i : std::as_const(m_keys)) { QScopedPointer marker(markerList->get_props(qUtf8Printable(QString::number(i)))); if (marker && marker->is_valid()) { Markers::Marker m;