aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/shared')
-rw-r--r--tests/auto/quick/shared/viewtestutil.cpp7
-rw-r--r--tests/auto/quick/shared/viewtestutil.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp
index 59ebed50b9..f68ca1fd33 100644
--- a/tests/auto/quick/shared/viewtestutil.cpp
+++ b/tests/auto/quick/shared/viewtestutil.cpp
@@ -403,6 +403,13 @@ void QQuickViewTestUtil::QaimModel::reset()
emit endResetModel();
}
+void QQuickViewTestUtil::QaimModel::resetItems(const QList<QPair<QString, QString> > &items)
+{
+ beginResetModel();
+ list = items;
+ endResetModel();
+}
+
void QQuickViewTestUtil::QaimModel::matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2) {
for (int i=0; i<other.count(); i++) {
QVERIFY2(list.contains(other[i]),
diff --git a/tests/auto/quick/shared/viewtestutil.h b/tests/auto/quick/shared/viewtestutil.h
index 66921a7273..3108030406 100644
--- a/tests/auto/quick/shared/viewtestutil.h
+++ b/tests/auto/quick/shared/viewtestutil.h
@@ -144,6 +144,7 @@ namespace QQuickViewTestUtil
void clear();
void reset();
+ void resetItems(const QList<QPair<QString, QString> > &items);
void matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2);