diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 2734cc82b65..c81a702ffa2 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -458,7 +458,7 @@ void PlaylistDAO::removeTracksFromPlaylist(int playlistId, QList positions) //qDebug() << "PlaylistDAO::removeTrackFromPlaylist" // << QThread::currentThread() << m_database.connectionName(); ScopedTransaction transaction(m_database); - for (const auto position : positions) { + for (const auto position : qAsConst(positions)) { removeTracksFromPlaylistInner(playlistId, position); } transaction.commit(); diff --git a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp index c199cd670b4..f87e42e797d 100644 --- a/src/library/playlistfeature.cpp +++ b/src/library/playlistfeature.cpp @@ -237,7 +237,7 @@ void PlaylistFeature::slotPlaylistContentChanged(QSet playlistIds) { return; } - for (const auto playlistId : playlistIds) { + for (const auto playlistId : qAsConst(playlistIds)) { enum PlaylistDAO::HiddenType type = m_playlistDao.getHiddenType(playlistId); if (type == PlaylistDAO::PLHT_NOT_HIDDEN || type == PlaylistDAO::PLHT_UNKNOWN) { // In case of a deleted Playlist diff --git a/src/library/playlisttablemodel.cpp b/src/library/playlisttablemodel.cpp index fc71087da51..06a77138932 100644 --- a/src/library/playlisttablemodel.cpp +++ b/src/library/playlisttablemodel.cpp @@ -132,7 +132,9 @@ void PlaylistTableModel::removeTracks(const QModelIndexList& indices) { trackPositions.append(trackPosition); } - m_pTrackCollection->getPlaylistDAO().removeTracksFromPlaylist(m_iPlaylistId, trackPositions); + m_pTrackCollection->getPlaylistDAO().removeTracksFromPlaylist( + m_iPlaylistId, + std::move(trackPositions)); } void PlaylistTableModel::moveTrack(const QModelIndex& sourceIndex, diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 5ccddcca3d1..c6bc6c98c40 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -337,7 +337,7 @@ void SetlogFeature::slotPlaylistContentChanged(QSet playlistIds) { return; } - for (const auto playlistId : playlistIds) { + for (const auto playlistId : qAsConst(playlistIds)) { enum PlaylistDAO::HiddenType type = m_playlistDao.getHiddenType(playlistId); if (type == PlaylistDAO::PLHT_SET_LOG || type == PlaylistDAO::PLHT_UNKNOWN) { // In case of a deleted Playlist