summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/services
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-11-23 12:25:17 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-02-27 15:44:46 +0000
commit44af54419eaceb27bb729717d6363917fd6bb819 (patch)
treeb111875dd8cb8ff653cb0e27cfa766933ca6d589 /src/platformsupport/services
parent85b30fda7ceccecfd3938703979b3431bdedc9a2 (diff)
Properly use the "process" feature
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/platformsupport/services')
-rw-r--r--src/platformsupport/services/genericunix/qgenericunixservices.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
index a24ab82057..01d988fdbe 100644
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
@@ -41,7 +41,9 @@
#include <QtGui/private/qtguiglobal_p.h>
#include <QtCore/QStandardPaths>
-#include <QtCore/QProcess>
+#if QT_CONFIG(process)
+# include <QtCore/QProcess>
+#endif
#include <QtCore/QUrl>
#include <QtCore/QDebug>
@@ -121,7 +123,7 @@ static inline bool launch(const QString &launcher, const QUrl &url)
const QString command = launcher + QLatin1Char(' ') + QLatin1String(url.toEncoded());
if (debug)
qDebug("Launching %s", qPrintable(command));
-#if defined(QT_NO_PROCESS)
+#if !QT_CONFIG(process)
const bool ok = ::system(qPrintable(command + QLatin1String(" &")));
#else
const bool ok = QProcess::startDetached(command);