summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-13 09:50:43 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-03-13 15:55:44 +0100
commitd51c3ecf8ef6e28557c66745f50a223cc5b1ce54 (patch)
tree023a1ecaa944152e08ba11291ec7aadc12f59dad /tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
parentf06f1adb6cc3835793a15eafa2d5a3affad712a2 (diff)
parent3a1f4b186d8ce79717da37f808ff9a4b3e949d9c (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
Diffstat (limited to 'tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp')
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index b1ec94403a..87fd5c0dc6 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -73,7 +73,7 @@ void tst_QClipboard::cleanupTestCase()
void tst_QClipboard::init()
{
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
const QString testdataDir = QFileInfo(QFINDTESTDATA("copier")).absolutePath();
QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir));
#endif
@@ -218,7 +218,7 @@ void tst_QClipboard::testSignals()
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(Q_OS_QNX)
static bool runHelper(const QString &program, const QStringList &arguments, QByteArray *errorMessage)
{
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
QProcess process;
process.setReadChannelMode(QProcess::ForwardedChannels);
process.start(program, arguments);
@@ -254,19 +254,19 @@ static bool runHelper(const QString &program, const QStringList &arguments, QByt
return false;
}
return true;
-#else // QT_NO_PROCESS
+#else // QT_CONFIG(process)
Q_UNUSED(program)
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
return false;
-#endif // QT_NO_PROCESS
+#endif // QT_CONFIG(process)
}
// Test that pasted text remains on the clipboard after a Qt application exits.
// This test does not make sense on X11 and embedded, copied data disappears from the clipboard when the application exits
void tst_QClipboard::copy_exit_paste()
{
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
// ### It's still possible to test copy/paste - just keep the apps running
if (!PlatformClipboard::isAvailable())
QSKIP("Native clipboard not working in this setup");
@@ -282,12 +282,12 @@ void tst_QClipboard::copy_exit_paste()
QStringList() << QStringLiteral("--text") << stringArgument,
&errorMessage),
errorMessage.constData());
-#endif // QT_NO_PROCESS
+#endif // QT_CONFIG(process)
}
void tst_QClipboard::copyImage()
{
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
if (!PlatformClipboard::isAvailable())
QSKIP("Native clipboard not working in this setup");
QImage image(100, 100, QImage::Format_ARGB32);
@@ -303,7 +303,7 @@ void tst_QClipboard::copyImage()
QVERIFY2(runHelper(QStringLiteral("paster/paster"),
QStringList(QStringLiteral("--image")), &errorMessage),
errorMessage.constData());
-#endif // QT_NO_PROCESS
+#endif // QT_CONFIG(process)
}
#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_QNX