diff options
author | Andrew Knight <andrew.knight@digia.com> | 2013-09-02 21:00:14 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-03 08:42:24 +0200 |
commit | cd582f841076010dac334427830763838c0996b8 (patch) | |
tree | 42cf3aa63d8f9c4ce15c960788e4b973cb436048 /tests/auto/corelib/tools/qsharedpointer/externaltests.cpp | |
parent | 5bd6a4b71a5eeb88ccc2f0fd1515deeeb92e1b53 (diff) |
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qsharedpointer/externaltests.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qsharedpointer/externaltests.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp index 0c76faf613..d786d1a2ce 100644 --- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp @@ -79,6 +79,7 @@ static QString makespec() QT_BEGIN_NAMESPACE namespace QTest { +#ifndef QT_NO_PROCESS class QExternalProcess: public QProcess { protected: @@ -99,6 +100,7 @@ namespace QTest { } #endif }; +#endif // !QT_NO_PROCESS class QExternalTestPrivate { @@ -565,6 +567,7 @@ namespace QTest { bool QExternalTestPrivate::runQmake() { +#ifndef QT_NO_PROCESS if (temporaryDirPath.isEmpty()) qWarning() << "Temporary directory is expected to be non-empty"; @@ -607,10 +610,16 @@ namespace QTest { } return ok && exitCode == 0; +#else // QT_NO_PROCESS + return false; +#endif // QT_NO_PROCESS } bool QExternalTestPrivate::runMake(Target target) { +#ifdef QT_NO_PROCESS + return false; +#else if (temporaryDirPath.isEmpty()) qWarning() << "Temporary directory is expected to be non-empty"; @@ -666,6 +675,7 @@ namespace QTest { std_err += make.readAllStandardError(); return ok; +#endif // !QT_NO_PROCESS } bool QExternalTestPrivate::commonSetup(const QByteArray &body) |