aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 9419dae362..ca438a9cd5 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -40,9 +40,9 @@
#include <QtQuick/private/qquicklistview_p.h>
#include <QtQuick/private/qquickmousearea_p.h>
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQml/private/qqmlobjectmodel_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
-#include <QtQml/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
#include "../../shared/util.h"
#include "../shared/viewtestutil.h"
#include "../shared/visualtestutil.h"
@@ -7307,11 +7307,13 @@ QList<int> tst_QQuickListView::toIntList(const QVariantList &list)
void tst_QQuickListView::matchIndexLists(const QVariantList &indexLists, const QList<int> &expectedIndexes)
{
+ const QSet<int> expectedIndexSet(expectedIndexes.cbegin(), expectedIndexes.cend());
for (int i=0; i<indexLists.count(); i++) {
- QSet<int> current = indexLists[i].value<QList<int> >().toSet();
- if (current != expectedIndexes.toSet())
+ const auto &currentList = indexLists[i].value<QList<int> >();
+ const QSet<int> current(currentList.cbegin(), currentList.cend());
+ if (current != expectedIndexSet)
qDebug() << "Cannot match actual targets" << current << "with expected" << expectedIndexes;
- QCOMPARE(current, expectedIndexes.toSet());
+ QCOMPARE(current, expectedIndexSet);
}
}