From ddf8b2770c73e68a90691524e81bef32280b93e0 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 18 Aug 2020 17:04:21 +0200 Subject: [PATCH] tst_qplainttextedit: Do not use paste() method with no clipboard On QNX the test fails to build because there is no clipboard feature and the code is using the paste() method which doesn't exist. Task-number: QTBUG-83202 Change-Id: Ie070ec8850b528e122e954074a1a0a3c78a14248 Reviewed-by: Alexandru Croitor --- .../widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index 2f695186634..d3b3f723674 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -150,7 +150,9 @@ private slots: #if QT_CONFIG(scrollbar) void updateAfterChangeCenterOnScroll(); #endif +#ifndef QT_NO_CLIPBOARD void updateCursorPositionAfterEdit(); +#endif private: void createSelection(); @@ -1756,6 +1758,7 @@ void tst_QPlainTextEdit::updateAfterChangeCenterOnScroll() #endif +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::updateCursorPositionAfterEdit() { QPlainTextEdit plaintextEdit; @@ -1800,6 +1803,7 @@ void tst_QPlainTextEdit::updateCursorPositionAfterEdit() // The curser should move back to the end of the copied text QCOMPARE(plaintextEdit.textCursor().position(), initialPosition + txt.length()); } +#endif QTEST_MAIN(tst_QPlainTextEdit) #include "tst_qplaintextedit.moc"