diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-07-19 10:03:10 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-07-19 09:25:28 +0000 |
commit | b4fc940978e7995e75f17a5386c30ef42333bd38 (patch) | |
tree | 952694829724e2f3493e621cfe8f497ff7bb8b16 | |
parent | 9dc4085e593c90c49eb9964ea99295874c62dc4c (diff) |
Stabilize tst_QQuickView::resizemodeitem
FAIL! : tst_QQuickView::resizemodeitem() Compared values are not the same
Actual (sizeListener.at(i)): QSize(80x100)
Expected (view->size()) : QSize(200x300)
Loc: [tst_qquickview.cpp(172)]
The "SizeChangesListener" can be instantiated too early, catching
signals from the previous resize events. Make sure to flush all events
before.
Change-Id: Ib0933429f5c589f120c263619f00893fa813e361
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | tests/auto/quick/qquickview/tst_qquickview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp index 0f325fddf5..fa9192edb4 100644 --- a/tests/auto/quick/qquickview/tst_qquickview.cpp +++ b/tests/auto/quick/qquickview/tst_qquickview.cpp @@ -162,6 +162,7 @@ void tst_QQuickView::resizemodeitem() QCOMPARE(QSize(item->width(), item->height()), view->sizeHint()); // size update from view + QCoreApplication::processEvents(); // make sure the last resize events are gone SizeChangesListener sizeListener(item); view->resize(QSize(200,300)); QTRY_COMPARE(item->width(), 200.0); |