diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-06 18:12:53 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-06 18:12:53 +0100 |
commit | 853b4b08d54f70d04d371d707e50760ffecf2f77 (patch) | |
tree | 2220ac8be8ae9bb5b25cf560eec3dc973c09b8e8 /tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | |
parent | 047bdf90db4d00d0462b9faf2044070be4a0e682 (diff) | |
parent | 87999238141588987b3cef6cd68ff62a7e3e8daa (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4
Change-Id: I8ede7e36592cd21f3e4a0a9b30dbe26bb40fe69b
Diffstat (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index 0bb913d104..3f66daf87f 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -38,6 +38,7 @@ #include <private/qqmlvaluetype_p.h> #include <math.h> #include "../../shared/util.h" +#include "../shared/geometrytestutil.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -790,7 +791,14 @@ void tst_qquickflickable::resizeContent() QCOMPARE(obj->contentWidth(), 300.); QCOMPARE(obj->contentHeight(), 300.); + QQuickFlickablePrivate *fp = QQuickFlickablePrivate::get(obj); + QSizeChangeListener sizeListener(fp->contentItem); + QMetaObject::invokeMethod(root, "resizeContent"); + for (const QSize sizeOnGeometryChanged : sizeListener) { + // Check that we have the correct size on all signals + QCOMPARE(sizeOnGeometryChanged, QSize(600, 600)); + } QCOMPARE(obj->contentX(), 100.); QCOMPARE(obj->contentY(), 100.); |