summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp6
-rw-r--r--tests/auto/gui/kernel/qguitimer/qguitimer.pro2
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp10
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp4
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST2
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp16
6 files changed, 23 insertions, 17 deletions
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index a935258fb8..6ba488aaa7 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -227,7 +227,7 @@ void tst_QGuiApplication::focusObject()
QOpenGLContext context;
context.create();
context.makeCurrent(&window1);
- QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window
+ QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window
context.swapBuffers(&window1);
#endif
@@ -392,7 +392,7 @@ void tst_QGuiApplication::changeFocusWindow()
QOpenGLContext context;
context.create();
context.makeCurrent(&window1);
- QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window
+ QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window
context.swapBuffers(&window1);
#endif
FocusChangeWindow window2;
@@ -406,7 +406,7 @@ void tst_QGuiApplication::changeFocusWindow()
#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
context.makeCurrent(&window2);
- QTest::qWaitForWindowExposed(&window2); // Buffer swap only succeeds with exposed window
+ QVERIFY(QTest::qWaitForWindowExposed(&window2)); // Buffer swap only succeeds with exposed window
context.swapBuffers(&window2);
#endif
QVERIFY(QTest::qWaitForWindowExposed(&window1));
diff --git a/tests/auto/gui/kernel/qguitimer/qguitimer.pro b/tests/auto/gui/kernel/qguitimer/qguitimer.pro
index 8a71e48007..9c58f0e22c 100644
--- a/tests/auto/gui/kernel/qguitimer/qguitimer.pro
+++ b/tests/auto/gui/kernel/qguitimer/qguitimer.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_qguitimer
-QT = core gui testlib
+QT = core core-private gui testlib
SOURCES += ../../../corelib/kernel/qtimer/tst_qtimer.cpp
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 7200d1cc8a..f74ae00bff 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -62,7 +62,7 @@ void tst_QOpenGLWindow::create()
w.resize(640, 480);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
QVERIFY(w.isValid());
}
@@ -111,7 +111,7 @@ void tst_QOpenGLWindow::basic()
w.reset();
w.resize(640, 480);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
// Check that the virtuals are invoked.
QCOMPARE(w.initCount, 1);
@@ -170,7 +170,7 @@ void tst_QOpenGLWindow::painter()
PainterWindow w;
w.resize(400, 400);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
QCOMPARE(w.img.size(), w.size() * w.devicePixelRatio());
QVERIFY(w.img.pixel(QPoint(5, 5) * w.devicePixelRatio()) == qRgb(0, 0, 255));
@@ -212,7 +212,7 @@ void tst_QOpenGLWindow::partial()
PartialPainterWindow w(u);
w.resize(800, 400);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
// Add a couple of small blue rects.
for (int i = 0; i < 10; ++i) {
@@ -285,7 +285,7 @@ void tst_QOpenGLWindow::underOver()
PaintUnderOverWindow w;
w.resize(400, 400);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
// under -> paint -> over -> under -> paint -> ... is the only acceptable sequence
QCOMPARE(w.m_state, PaintUnderOverWindow::PaintOver);
diff --git a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
index 7fb79b28ae..ffc440ac2d 100644
--- a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
+++ b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
@@ -46,7 +46,7 @@ void tst_QRasterWindow::create()
w.resize(640, 480);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
}
class PainterWindow : public QRasterWindow
@@ -70,7 +70,7 @@ void tst_QRasterWindow::basic()
w.reset();
w.resize(400, 400);
w.show();
- QTest::qWaitForWindowExposed(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));;
QVERIFY(w.paintCount >= 1);
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index 9ffcf73d64..3e03d9e236 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -23,3 +23,5 @@ osx
osx-10.11 ci
osx-10.12 ci
+[testInputEvents]
+rhel-7.4
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);