diff options
Diffstat (limited to 'tests/auto/corelib/kernel')
5 files changed, 18 insertions, 15 deletions
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index a7c608ec2e..31e76c4407 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -928,7 +928,7 @@ void tst_QCoreApplication::threadedEventDelivery() QCOMPARE(receiver.recordedEvents.contains(QEvent::User + 1), eventsReceived); } -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) void tst_QCoreApplication::addRemoveLibPaths() { QStringList paths = QCoreApplication::libraryPaths(); diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h index 342bd272a3..b6c20a915f 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h @@ -59,7 +59,7 @@ private slots: void applicationEventFilters_auxThread(); void threadedEventDelivery_data(); void threadedEventDelivery(); -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) void addRemoveLibPaths(); #endif }; diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index f44c40c27f..e4677c6e34 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -41,8 +41,9 @@ #include <QThread> #include <QMutex> #include <QWaitCondition> -#include <QProcess> - +#if QT_CONFIG(process) +# include <QProcess> +#endif #include "qobject.h" #ifdef QT_BUILD_INTERNAL #include <private/qobject_p.h> @@ -281,7 +282,7 @@ static void playWithObjects() void tst_QObject::initTestCase() { -#ifndef QT_NO_PROCESS +#if QT_CONFIG(process) const QString testDataDir = QFileInfo(QFINDTESTDATA("signalbug")).absolutePath(); QVERIFY2(QDir::setCurrent(testDataDir), qPrintable("Could not chdir to " + testDataDir)); #endif @@ -3006,7 +3007,7 @@ void tst_QObject::dynamicProperties() void tst_QObject::recursiveSignalEmission() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QProcess proc; 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 <QDebug> #include <QFile> -#include <QProcess> +#if QT_CONFIG(process) +# include <QProcess> +#endif #include <QSharedMemory> #include <QTest> #include <QThread> @@ -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<int>("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); diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp index 641ea5fc9d..6ff1e14976 100644 --- a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp +++ b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp @@ -172,7 +172,7 @@ void tst_QSystemSemaphore::release() void tst_QSystemSemaphore::basicProcesses() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QSystemSemaphore sem("store", 0, QSystemSemaphore::Create); @@ -208,7 +208,7 @@ void tst_QSystemSemaphore::processes_data() void tst_QSystemSemaphore::processes() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QSystemSemaphore sem("store", 1, QSystemSemaphore::Create); @@ -237,7 +237,7 @@ void tst_QSystemSemaphore::processes() #if !defined(Q_OS_WIN) && !defined(QT_POSIX_IPC) void tst_QSystemSemaphore::undo() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QSystemSemaphore sem("store", 1, QSystemSemaphore::Create); @@ -262,7 +262,7 @@ void tst_QSystemSemaphore::undo() void tst_QSystemSemaphore::initialValue() { -#ifdef QT_NO_PROCESS +#if !QT_CONFIG(process) QSKIP("No qprocess support", SkipAll); #else QSystemSemaphore sem("store", 1, QSystemSemaphore::Create); |