summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-03-15 16:24:47 +0100
committerIvan Solovev <ivan.solovev@qt.io>2022-03-18 18:35:03 +0100
commit30830e0cbad58f8efe034256bb2cf094f6f483ae (patch)
treeccc2e06d8cfbfa6928d5d880faf4df297f25d785 /tests/auto/widgets
parent9985cc330adb2af1b601e8a77ff5f9b485729577 (diff)
Android: use empty Intent to clear clipboard data on API < 28
ClipboardManager didn't have any APIs to clear clipboard data before API level 28. As a workaround an empty Intent with MIMETYPE_UNKNOWN is created and inserted into the clipboard for lower API levels. This makes the QApplication::clipboard()->clear() method work more or less as expected. This allows to unblacklist tst_QPlainTextEdit::copyAvailable(). Task-number: QTBUG-87423 Task-number: QTBUG-89402 Pick-to: 6.3 6.2 Change-Id: I454376199cf3b8eed0fa2ecf2f85b87f40892280 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 32e85abfbb..08883f8c34 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -1028,10 +1028,6 @@ void tst_QPlainTextEdit::copyAvailable()
#endif
ed->clear();
QApplication::clipboard()->clear();
-#ifdef Q_OS_ANDROID
- if (QNativeInterface::QAndroidApplication::sdkVersion() < 28)
- QEXPECT_FAIL("", "Before Android 9, there's no API to clear the clipboard ", Continue);
-#endif
QVERIFY(!ed->canPaste());
QSignalSpy spyCopyAvailabe(ed, SIGNAL(copyAvailable(bool)));