diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-04-06 12:50:02 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-04-09 07:12:29 +0000 |
commit | 1b109dbd917e7e4627177f375f17e60257486520 (patch) | |
tree | bbe5d30f63186e2a3e1b3a6ab18338c6420c2921 /tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | |
parent | b451c9dfdc1421e202b5ce9c2e06931fc0c4c215 (diff) |
tst_QClipboard: Skip on Wayland, as it requires real input events
On Wayland, manipulating the clipboard requires an input event serial, which is
not possible to get unless the compositor sends us input events.
Change-Id: If5231a5db85f8d6ad988ea93f240cee0c3466f9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | 19 |
1 files changed, 7 insertions, 12 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) |