diff options
Diffstat (limited to 'tests/auto/quick/shared')
-rw-r--r-- | tests/auto/quick/shared/util.pri | 2 | ||||
-rw-r--r-- | tests/auto/quick/shared/viewtestutil.h | 3 | ||||
-rw-r--r-- | tests/auto/quick/shared/visualtestutil.h | 6 |
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/quick/shared/util.pri b/tests/auto/quick/shared/util.pri index aa79c7ca98..28036f109c 100644 --- a/tests/auto/quick/shared/util.pri +++ b/tests/auto/quick/shared/util.pri @@ -1,4 +1,6 @@ +QT += core-private gui-private v8-private qml-private quick-private + HEADERS += $$PWD/visualtestutil.h \ $$PWD/viewtestutil.h SOURCES += $$PWD/visualtestutil.cpp \ diff --git a/tests/auto/quick/shared/viewtestutil.h b/tests/auto/quick/shared/viewtestutil.h index 06efd9c28e..10ecd6a2ce 100644 --- a/tests/auto/quick/shared/viewtestutil.h +++ b/tests/auto/quick/shared/viewtestutil.h @@ -60,7 +60,7 @@ namespace QQuickViewTestUtil QList<int> adjustIndexesForRemoveDisplaced(const QList<int> &indexes, int index, int count); struct ListChange { - enum { Inserted, Removed, Moved, SetCurrent, SetContentY } type; + enum { Inserted, Removed, Moved, SetCurrent, SetContentY, Polish } type; int index; int count; int to; // Move @@ -71,6 +71,7 @@ namespace QQuickViewTestUtil static ListChange move(int index, int to, int count) { ListChange c = { Moved, index, count, to, 0.0 }; return c; } static ListChange setCurrent(int index) { ListChange c = { SetCurrent, index, -1, -1, 0.0 }; return c; } static ListChange setContentY(qreal pos) { ListChange c = { SetContentY, -1, -1, -1, pos }; return c; } + static ListChange polish() { ListChange c = { Polish, -1, -1, -1, 0.0 }; return c; } }; class QmlListModel : public QListModelInterface diff --git a/tests/auto/quick/shared/visualtestutil.h b/tests/auto/quick/shared/visualtestutil.h index 9407ff8e8f..c2fc9cc01f 100644 --- a/tests/auto/quick/shared/visualtestutil.h +++ b/tests/auto/quick/shared/visualtestutil.h @@ -45,6 +45,8 @@ #include <QtQuick/QQuickItem> #include <QtQml/QQmlExpression> +#include <QtQuick/private/qquickitem_p.h> + namespace QQuickVisualTestUtil { QQuickItem *findVisibleChild(QQuickItem *parent, const QString &objectName); @@ -106,7 +108,9 @@ namespace QQuickVisualTestUtil items << qobject_cast<QQuickItem*>(findItem<T>(parent, objectName, indexes[i])); return items; } - } +#define QQUICK_VERIFY_POLISH(item) \ + QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false) + #endif // QQUICKVISUALTESTUTIL_H |