aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/shared/viewtestutil.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-19 12:49:16 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-19 12:59:04 +0100
commit4e7f570f921671c627040537b4dd8cdb77bda3d1 (patch)
tree7d82e1b6536d5274ab29a3e6307fedcbefd3ce78 /tests/auto/quick/shared/viewtestutil.h
parent72447b6dbf98ace65ec46559337243970a668d26 (diff)
parent39df6760e4db6af700c46a420286b51113b5dadb (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
Diffstat (limited to 'tests/auto/quick/shared/viewtestutil.h')
-rw-r--r--tests/auto/quick/shared/viewtestutil.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/shared/viewtestutil.h b/tests/auto/quick/shared/viewtestutil.h
index 0f50180809..b11d5e4859 100644
--- a/tests/auto/quick/shared/viewtestutil.h
+++ b/tests/auto/quick/shared/viewtestutil.h
@@ -34,6 +34,8 @@
#include <QtCore/QAbstractListModel>
QT_FORWARD_DECLARE_CLASS(QQuickView)
+QT_FORWARD_DECLARE_CLASS(QQuickItemViewPrivate)
+QT_FORWARD_DECLARE_CLASS(FxViewItem)
namespace QQuickViewTestUtil
{
@@ -154,6 +156,26 @@ namespace QQuickViewTestUtil
for (; f != replaced.end(); ++f, ++t)
*t = *f;
}
+
+ class StressTestModel : public QAbstractListModel
+ {
+ Q_OBJECT
+
+ public:
+
+ StressTestModel();
+
+ int rowCount(const QModelIndex &) const;
+ QVariant data(const QModelIndex &, int) const;
+
+ public Q_SLOTS:
+ void updateModel();
+
+ private:
+ int m_rowCount;
+ };
+
+ bool testVisibleItems(const QQuickItemViewPrivate *priv, bool *nonUnique, FxViewItem **failItem, int *expectedIdx);
}
namespace QQuickTouchUtils {