diff --git a/tests/src/core/testqgsogrutils.cpp b/tests/src/core/testqgsogrutils.cpp index 2deb86d4e4f3..0a28627d2228 100644 --- a/tests/src/core/testqgsogrutils.cpp +++ b/tests/src/core/testqgsogrutils.cpp @@ -1104,7 +1104,7 @@ void TestQgsOgrUtils::testOgrUtilsStoredStyle() QCOMPARE( ids.size(), 3 ); QCOMPARE( names.size(), 3 ); QCOMPARE( descriptions.size(), 3 ); - QCOMPARE( names.toSet(), QSet() << QStringLiteral( "style1" ) << QStringLiteral( "style2" ) << QStringLiteral( "style3" ) ); + QCOMPARE( QSet( names.constBegin(), names.constEnd() ), QSet() << QStringLiteral( "style1" ) << QStringLiteral( "style2" ) << QStringLiteral( "style3" ) ); }