From cd582f841076010dac334427830763838c0996b8 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Mon, 2 Sep 2013 21:00:14 +0300 Subject: Add QT_NO_PROCESS guards in tests where they are missing A handful of tests lack QT_NO_PROCESS guards, making them non-compilable on Qt builds with no QProcess support. This commit does not change QProcess-specific tests, which should be left out of the build using the .pro file mechanism. Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12 Reviewed-by: Friedemann Kleint --- tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp') diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index 89807f3747..cf786c1dca 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -196,6 +196,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 QProcess process; process.setReadChannelMode(QProcess::ForwardedChannels); process.start(program, arguments); @@ -231,6 +232,12 @@ static bool runHelper(const QString &program, const QStringList &arguments, QByt return false; } return true; +#else // QT_NO_PROCESS + Q_UNUSED(program) + Q_UNUSED(arguments) + Q_UNUSED(errorMessage) + return false; +#endif // QT_NO_PROCESS } // Test that pasted text remains on the clipboard after a Qt application exits. -- cgit v1.2.3