diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-10 01:00:25 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-10 01:00:26 +0200 |
commit | e027c7241f073f5fc8c1db88700cc83635b6454f (patch) | |
tree | 69920e408b5eeb1547c0241696cfa845af85e4be /tests/auto/gui/kernel | |
parent | b2035d38e8dfdfe2ba8da96df5c1174f01dfbb5b (diff) | |
parent | 3b85d53913741660473dbc242a48c2ee65d51421 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r-- | tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | 19 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp | 8 |
2 files changed, 11 insertions, 16 deletions
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index 87fd5c0dc6..993ebbaac6 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -41,10 +41,8 @@ class tst_QClipboard : public QObject { Q_OBJECT private slots: -#ifdef QT_NO_CLIPBOARD void initTestCase(); - void cleanupTestCase(); -#else +#if QT_CONFIG(clipboard) void init(); #if defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(Q_OS_QNX) void copy_exit_paste(); @@ -58,19 +56,16 @@ private slots: #endif }; -#ifdef QT_NO_CLIPBOARD void tst_QClipboard::initTestCase() { +#if !QT_CONFIG(clipboard) QSKIP("This test requires clipboard support"); +#endif + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("Wayland: Manipulating the clipboard requires real input events. Can't auto test."); } -void tst_QClipboard::cleanupTestCase() -{ - QSKIP("This test requires clipboard support"); -} - -#else - +#if QT_CONFIG(clipboard) void tst_QClipboard::init() { #if QT_CONFIG(process) @@ -436,7 +431,7 @@ void tst_QClipboard::clearBeforeSetText() QCOMPARE(QGuiApplication::clipboard()->text(), text); } -#endif +#endif // QT_CONFIG(clipboard) QTEST_MAIN(tst_QClipboard) diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index d16d95500b..db5e83e2c7 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -608,7 +608,7 @@ void tst_QTouchEvent::basicRawEventTranslation() touchWidget.setAttribute(Qt::WA_AcceptTouchEvents); touchWidget.setGeometry(100, 100, 400, 300); touchWidget.show(); - QVERIFY(QTest::qWaitForWindowActive(&touchWidget)); + QVERIFY(QTest::qWaitForWindowExposed(&touchWidget)); QPointF pos = touchWidget.rect().center(); QPointF screenPos = touchWidget.mapToGlobal(pos.toPoint()); @@ -741,7 +741,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen() rightWidget.setGeometry(300, 100, 100, 100); touchWidget.show(); - QVERIFY(QTest::qWaitForWindowActive(&touchWidget)); + QVERIFY(QTest::qWaitForWindowExposed(&touchWidget)); QPointF leftPos = leftWidget.rect().center(); QPointF rightPos = rightWidget.rect().center(); @@ -968,7 +968,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() rightWidget.setGeometry(300, 100, 100, 100); touchWidget.show(); - QVERIFY(QTest::qWaitForWindowActive(&touchWidget)); + QVERIFY(QTest::qWaitForWindowExposed(&touchWidget)); QPointF leftPos = leftWidget.rect().center(); QPointF rightPos = rightWidget.rect().center(); @@ -1184,7 +1184,7 @@ void tst_QTouchEvent::basicRawEventTranslationOfIds() touchWidget.setAttribute(Qt::WA_AcceptTouchEvents); touchWidget.setGeometry(100, 100, 400, 300); touchWidget.show(); - QVERIFY(QTest::qWaitForWindowActive(&touchWidget)); + QVERIFY(QTest::qWaitForWindowExposed(&touchWidget)); QVarLengthArray<QPointF, 2> pos; QVarLengthArray<QPointF, 2> screenPos; |