summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-25 11:33:34 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-25 11:44:49 (GMT)
commita30aa66726c1992a0b21b3663b8080661d899e13 (patch)
treedce1ac2f17151b8a6e76eb1cfee3a0a85443d8d2 /tests
parent41f58d51cec171ccfa132dad2d863340d3ed2db4 (diff)
downloadQt-a30aa66726c1992a0b21b3663b8080661d899e13.zip
Qt-a30aa66726c1992a0b21b3663b8080661d899e13.tar.gz
Qt-a30aa66726c1992a0b21b3663b8080661d899e13.tar.bz2
Test for the clipboard presence in autotest
Diffstat (limited to 'tests')
-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");