summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlineedit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlineedit')
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index dd5bb29..79d1b3a 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -1415,8 +1415,22 @@ void tst_QLineEdit::undo_keypressevents()
}
#ifndef QT_NO_CLIPBOARD
+static bool nativeClipboardWorking()
+{
+#ifdef Q_WS_MAC
+ PasteboardRef pasteboard;
+ OSStatus status = PasteboardCreate(0, &pasteboard);
+ if (status == noErr)
+ CFRelease(pasteboard);
+ return status == noErr;
+#endif
+ return true;
+}
+
void tst_QLineEdit::QTBUG5786_undoPaste()
{
+ if (!nativeClipboardWorking())
+ QSKIP("this machine doesn't support the clipboard", SkipAll);
QString initial("initial");
QString string("test");
QString additional("add");