summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
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 /tests/auto/widgets/kernel
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 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index d6f3728663..13994e3b02 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -35,7 +35,9 @@
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
-#include <QtCore/QProcess>
+#if QT_CONFIG(process)
+# include <QtCore/QProcess>
+#endif
#include <QtCore/private/qeventloop_p.h>
#include <QtGui/QFontDatabase>
@@ -1432,7 +1434,7 @@ void tst_QApplication::testDeleteLaterProcessEvents()
*/
void tst_QApplication::desktopSettingsAware()
{
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
QString path;
{
// We need an application object for QFINDTESTDATA to work
@@ -2121,7 +2123,7 @@ void tst_QApplication::qtbug_12673()
QVERIFY2(!path.isEmpty(), "Cannot locate modal helper application");
path += "modal";
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
QProcess testProcess;
QStringList arguments;
testProcess.start(path, arguments);
@@ -2254,7 +2256,7 @@ void tst_QApplication::settableStyleHints()
executed *after* the destruction of QApplication.
*/
Q_GLOBAL_STATIC(QLocale, tst_qapp_locale);
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
Q_GLOBAL_STATIC(QProcess, tst_qapp_process);
#endif
#ifndef QT_NO_FILESYSTEMWATCHER
@@ -2279,7 +2281,7 @@ void tst_QApplication::globalStaticObjectDestruction()
int argc = 1;
QApplication app(argc, &argv0);
QVERIFY(tst_qapp_locale());
-#ifndef QT_NO_PROCESS
+#if QT_CONFIG(process)
QVERIFY(tst_qapp_process());
#endif
#ifndef QT_NO_FILESYSTEMWATCHER