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. Pick-to: 6.3 6.2 Task-number: QTBUG-100470 Change-Id: Ie2d8aabf77672c62b3a6c72a080a4e37f1696303 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
parent
6696134644
commit
a818885a3d
@ -1028,6 +1028,10 @@ void tst_QPlainTextEdit::copyAvailable()
|
|||||||
#endif
|
#endif
|
||||||
ed->clear();
|
ed->clear();
|
||||||
QApplication::clipboard()->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());
|
QVERIFY(!ed->canPaste());
|
||||||
QSignalSpy spyCopyAvailabe(ed, SIGNAL(copyAvailable(bool)));
|
QSignalSpy spyCopyAvailabe(ed, SIGNAL(copyAvailable(bool)));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user