From 44af54419eaceb27bb729717d6363917fd6bb819 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 23 Nov 2016 12:25:17 +0100 Subject: 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 --- .../corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp') diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp index 26caff4301..8833321b4f 100644 --- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp +++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp @@ -28,7 +28,9 @@ #include #include -#include +#if QT_CONFIG(process) +# include +#endif #include #include #include @@ -133,7 +135,7 @@ tst_QSharedMemory::~tst_QSharedMemory() void tst_QSharedMemory::initTestCase() { -#ifndef QT_NO_PROCESS +#if QT_CONFIG(process) QVERIFY2(!m_helperBinary.isEmpty(), "Could not find helper binary"); #endif } @@ -455,7 +457,7 @@ void tst_QSharedMemory::emptyMemory() #if !defined(Q_OS_WIN) void tst_QSharedMemory::readOnly() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else rememberKey("readonly_segfault"); @@ -736,7 +738,7 @@ void tst_QSharedMemory::simpleThreadedProducerConsumer() void tst_QSharedMemory::simpleProcessProducerConsumer_data() { -#ifndef QT_NO_PROCESS +#if QT_CONFIG(process) QTest::addColumn("processes"); int tries = 5; for (int i = 0; i < tries; ++i) { @@ -751,7 +753,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer_data() */ void tst_QSharedMemory::simpleProcessProducerConsumer() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QFETCH(int, processes); -- cgit v1.2.3