diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-03-14 15:04:33 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-15 18:40:05 +0000 |
commit | ea33f92d22d5b9b4b7ba865c09c1ea832d44bba6 (patch) | |
tree | bf8302430024f41fd0cf5b23f7614f75e7ae2bb7 | |
parent | 893d61c4aa88aab4cbacf57a8a1763514b4ac9c4 (diff) |
Android: expect QPlainTextEdit::canPaste() to fail after clipboard clear
Android 9 introduce an API call to clear the clipboard, before that
it wasn't possible to do that, the test QPlainTextEdit::canPaste()
should expect that to fail.
Task-number: QTBUG-100470
Change-Id: Ie2d8aabf77672c62b3a6c72a080a4e37f1696303
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit a818885a3d62498d03bd6074ece602d1cbb0cd16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index 2a86a6d753..759430448d 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -1025,6 +1025,10 @@ 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))); |