Fix building with -no-feature-process

Drop an unused include, don't try to build qmlplugindump in this
case, and add some guards around QProcess includes and usages.

Change-Id: I6ce5985a8dd1967f146016a7acd1ea31fb3bda2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Ulf Hermann 2017-03-02 11:41:47 +01:00
parent 5cd4c2ced4
commit 408620ea99
4 changed files with 8 additions and 5 deletions

View File

@ -29,7 +29,9 @@
#include <qtest.h>
#include <QLibraryInfo>
#include <QDir>
#if QT_CONFIG(process)
#include <QProcess>
#endif
#include <QDebug>
#include <QQmlError>
#include <cstdlib>
@ -42,7 +44,7 @@ public:
private slots:
void initTestCase();
#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
void qmlMinify_data();
void qmlMinify();
#endif
@ -166,7 +168,7 @@ Examples are any .qml files under the examples/ directory that start
with a lower case letter.
*/
#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
void tst_qmlmin::qmlMinify_data()
{
QTest::addColumn<QString>("file");
@ -183,7 +185,7 @@ void tst_qmlmin::qmlMinify_data()
}
#endif
#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
void tst_qmlmin::qmlMinify()
{
QFETCH(QString, file);

View File

@ -29,7 +29,9 @@
#include "../../shared/util.h"
#include <QQmlApplicationEngine>
#include <QSignalSpy>
#if QT_CONFIG(process)
#include <QProcess>
#endif
#include <QDebug>
class tst_qqmlapplicationengine : public QQmlDataTest

View File

@ -29,7 +29,6 @@
#include <qtest.h>
#include <QLibraryInfo>
#include <QDir>
#include <QProcess>
#include <QDebug>
#include <QtQuick/QQuickItem>
#include <QtQuick/QQuickView>

View File

@ -17,7 +17,7 @@ SUBDIRS += \
qmlscene \
qmltime
qtConfig(regularexpression) {
qtConfig(regularexpression):qtConfig(process) {
SUBDIRS += \
qmlplugindump
}