summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-17 10:19:31 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-17 10:34:24 +0200
commitd0a0a3c0418a0fdd2ed84b2a5f7e6565537715c6 (patch)
treed6aeb4d51caf30ccf23eadb806a09295cbf679cd /tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
parent9f405f98a4247cd263b9c5d35659a4ba89e282de (diff)
parentac35f9c44c0fb3b2f40ae5585c497200b2ba743d (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 24f61e4584..a365d21d36 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -409,13 +409,17 @@ void tst_QWindow::exposeEventOnShrink_QTBUG54040()
QVERIFY(QTest::qWaitForWindowExposed(&window));
- const int initialExposeCount = window.received(QEvent::Expose);
+ int exposeCount = window.received(QEvent::Expose);
window.resize(window.width(), window.height() - 5);
- QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 1);
+ QTRY_VERIFY(window.received(QEvent::Expose) > exposeCount);
+
+ exposeCount = window.received(QEvent::Expose);
window.resize(window.width() - 5, window.height());
- QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 2);
+ QTRY_VERIFY(window.received(QEvent::Expose) > exposeCount);
+
+ exposeCount = window.received(QEvent::Expose);
window.resize(window.width() - 5, window.height() - 5);
- QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 3);
+ QTRY_VERIFY(window.received(QEvent::Expose) > exposeCount);
}
void tst_QWindow::positioning_data()
@@ -486,7 +490,7 @@ void tst_QWindow::positioning()
window.showNormal();
QCoreApplication::processEvents();
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QMargins originalMargins = window.frameMargins();
@@ -1479,7 +1483,7 @@ void tst_QWindow::activateAndClose()
window.showNormal();
#if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store
// and then post the window in order for screen to show the window
- QTest::qWaitForWindowExposed(&window);
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QOpenGLContext context;
context.create();
context.makeCurrent(&window);