diff options
Diffstat (limited to 'tests/auto/qplaintextedit/tst_qplaintextedit.cpp')
-rw-r--r-- | tests/auto/qplaintextedit/tst_qplaintextedit.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/auto/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/qplaintextedit/tst_qplaintextedit.cpp index a0250fa..6835c21 100644 --- a/tests/auto/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/qplaintextedit/tst_qplaintextedit.cpp @@ -87,24 +87,32 @@ public slots: void cleanup(); private slots: void getSetCheck(); +#ifndef QT_NO_CLIPBOARD void clearMustNotChangeClipboard(); +#endif void clearMustNotResetRootFrameMarginToDefault(); void paragSeparatorOnPlaintextAppend(); +#ifndef QT_NO_CLIPBOARD void selectAllSetsNotSelection(); +#endif void asciiTab(); void setDocument(); void emptyAppend(); void appendOnEmptyDocumentShouldReuseInitialParagraph(); void cursorPositionChanged(); void setTextCursor(); +#ifndef QT_NO_CLIPBOARD void undoAvailableAfterPaste(); +#endif void undoRedoAvailableRepetition(); void appendShouldNotTouchTheSelection(); void backspace(); void shiftBackspace(); void undoRedo(); void preserveCharFormatInAppend(); +#ifndef QT_NO_CLIPBOARD void copyAndSelectAllInReadonly(); +#endif void ctrlAltInput(); void noPropertiesOnDefaultTextEditCharFormat(); void setPlainTextShouldEmitTextChangedOnce(); @@ -118,13 +126,17 @@ private slots: void undoRedoAfterSetContent(); void numPadKeyNavigation(); void moveCursor(); +#ifndef QT_NO_CLIPBOARD void mimeDataReimplementations(); +#endif void shiftEnterShouldInsertLineSeparator(); void selectWordsFromStringsContainingSeparators_data(); void selectWordsFromStringsContainingSeparators(); +#ifndef QT_NO_CLIPBOARD void canPaste(); void copyAvailable_data(); void copyAvailable(); +#endif void ensureCursorVisibleOnInitialShow(); void setTextInsideResizeEvent(); void colorfulAppend(); @@ -290,7 +302,7 @@ void tst_QPlainTextEdit::createSelection() #endif QCOMPARE(ed->textCursor().position(), 11); } - +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::clearMustNotChangeClipboard() { if (!nativeClipboardWorking()) @@ -301,6 +313,7 @@ void tst_QPlainTextEdit::clearMustNotChangeClipboard() ed->clear(); QCOMPARE(QApplication::clipboard()->text(), txt); } +#endif void tst_QPlainTextEdit::clearMustNotResetRootFrameMarginToDefault() { @@ -322,6 +335,7 @@ void tst_QPlainTextEdit::paragSeparatorOnPlaintextAppend() QCOMPARE(cnt, 2); } +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::selectAllSetsNotSelection() { if (!QApplication::clipboard()->supportsSelection()) { @@ -337,6 +351,7 @@ void tst_QPlainTextEdit::selectAllSetsNotSelection() QCOMPARE(QApplication::clipboard()->text(QClipboard::Selection), QString::fromAscii("foobar")); } +#endif void tst_QPlainTextEdit::asciiTab() { @@ -466,6 +481,7 @@ void tst_QPlainTextEdit::setTextCursor() QCOMPARE(spy.count(), 1); } +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::undoAvailableAfterPaste() { if (!nativeClipboardWorking()) @@ -479,6 +495,7 @@ void tst_QPlainTextEdit::undoAvailableAfterPaste() QVERIFY(spy.count() >= 1); QCOMPARE(ed->toPlainText(), txt); } +#endif class UndoRedoRecorder : public QObject { @@ -657,6 +674,7 @@ void tst_QPlainTextEdit::preserveCharFormatInAppend() QCOMPARE(cursor.block().text(), QString("third para")); } +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::copyAndSelectAllInReadonly() { if (!nativeClipboardWorking()) @@ -687,6 +705,7 @@ void tst_QPlainTextEdit::copyAndSelectAllInReadonly() QTest::keyClick(ed, Qt::Key_C, Qt::ControlModifier); QCOMPARE(QApplication::clipboard()->text(), QString("Hello World")); } +#endif void tst_QPlainTextEdit::ctrlAltInput() { @@ -903,6 +922,7 @@ void tst_QPlainTextEdit::implicitClear() QVERIFY(ed->toPlainText().isEmpty()); } +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::copyAvailable_data() { QTest::addColumn<pairListType>("keystrokes"); @@ -1020,6 +1040,7 @@ void tst_QPlainTextEdit::copyAvailable() QVERIFY2(variantSpyCopyAvailable.toBool() == copyAvailable.at(i), QString("Spied singnal: %1").arg(i).toLatin1()); } } +#endif void tst_QPlainTextEdit::undoRedoAfterSetContent() { @@ -1085,6 +1106,7 @@ public: }; +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::mimeDataReimplementations() { MyTextEdit ed; @@ -1121,6 +1143,7 @@ void tst_QPlainTextEdit::mimeDataReimplementations() QCOMPARE(ed.canInsertCallCount, 1); QCOMPARE(ed.insertCallCount, 1); } +#endif void tst_QPlainTextEdit::shiftEnterShouldInsertLineSeparator() { @@ -1160,6 +1183,7 @@ void tst_QPlainTextEdit::selectWordsFromStringsContainingSeparators() cursor.clearSelection(); } +#ifndef QT_NO_CLIPBOARD void tst_QPlainTextEdit::canPaste() { if (!nativeClipboardWorking()) @@ -1172,6 +1196,7 @@ void tst_QPlainTextEdit::canPaste() ed->setTextInteractionFlags(Qt::NoTextInteraction); QVERIFY(!ed->canPaste()); } +#endif void tst_QPlainTextEdit::ensureCursorVisibleOnInitialShow() { |