diff --git a/src/core/sqlquery.cpp b/src/core/sqlquery.cpp index 4baaca51..96e42b40 100644 --- a/src/core/sqlquery.cpp +++ b/src/core/sqlquery.cpp @@ -43,7 +43,7 @@ bool SqlQuery::Exec() { last_query_ = executedQuery(); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - for (QMap::const_iterator it = bound_values_.begin(); it != bound_values_.end(); ++it) { + for (QMap::const_iterator it = bound_values_.constBegin(); it != bound_values_.constEnd(); ++it) { last_query_.replace(it.key(), it.value().toString()); } bound_values_.clear(); diff --git a/tests/src/collectionbackend_test.cpp b/tests/src/collectionbackend_test.cpp index 03116db6..e7a1d001 100644 --- a/tests/src/collectionbackend_test.cpp +++ b/tests/src/collectionbackend_test.cpp @@ -534,7 +534,7 @@ TEST_F(UpdateSongsBySongID, UpdateSongsBySongID) { EXPECT_EQ(songs.count(), song_ids.count()); - for (QMap::const_iterator it = songs.begin() ; it != songs.end() ; ++it) { + for (QMap::const_iterator it = songs.constBegin() ; it != songs.constEnd() ; ++it) { EXPECT_EQ(it.key(), it.value().song_id()); }