diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index 90dd9fe3e6..a1b17539e7 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -376,6 +376,7 @@ public: int Bar::failureCount = 0; +#if QT_CONFIG(thread) class MetaTypeTorturer: public QThread { Q_OBJECT @@ -485,6 +486,7 @@ void tst_QMetaType::threadSafety() QCOMPARE(t3.failureCount, 0); QCOMPARE(Bar::failureCount, 0); } +#endif namespace TestSpace { diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h index 9fb5b63262..77feff806f 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h @@ -45,7 +45,9 @@ private: private slots: void defined(); +#if QT_CONFIG(thread) void threadSafety(); +#endif void namespaces(); void id(); void qMetaTypeId(); diff --git a/tests/auto/corelib/kernel/qpointer/CMakeLists.txt b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt index 4b023b7033..e94730ba90 100644 --- a/tests/auto/corelib/kernel/qpointer/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt @@ -7,6 +7,10 @@ ## tst_qpointer Test: ##################################################################### +if (NOT QT_FEATURE_thread) + return() +endif() + qt_internal_add_test(tst_qpointer SOURCES tst_qpointer.cpp diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp index 93d2ac9783..f796e6d790 100644 --- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp +++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp @@ -78,8 +78,10 @@ private slots: void compatPropertySignals(); void noFakeDependencies(); +#if QT_CONFIG(thread) void threadSafety(); void threadSafety2(); +#endif // QT_CONFIG(thread) void bindablePropertyWithInitialization(); void noDoubleNotification(); @@ -1661,6 +1663,7 @@ void tst_QProperty::noFakeDependencies() QCOMPARE(old, bindingFunctionCalled); } +#if QT_CONFIG(thread) struct ThreadSafetyTester : public QObject { Q_OBJECT @@ -1780,6 +1783,7 @@ void tst_QProperty::threadSafety2() QCOMPARE(movedObj->objectName(), "test"); QCOMPARE(movedObj->children().first()->objectName(), "child"); } +#endif // QT_CONFIG(thread) struct CustomType { diff --git a/tests/auto/corelib/kernel/qtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt index 1eed69e979..ef7cb92a23 100644 --- a/tests/auto/corelib/kernel/qtimer/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt @@ -7,6 +7,10 @@ ## tst_qtimer Test: ##################################################################### +if (NOT QT_FEATURE_thread) + return() +endif() + qt_internal_add_test(tst_qtimer SOURCES tst_qtimer.cpp diff --git a/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt index ca64f08869..dcf977c739 100644 --- a/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt @@ -7,6 +7,10 @@ ## tst_qtranslator Test: ##################################################################### +if (NOT QT_CONFIG_thread) + return() +endif() + qt_internal_add_test(tst_qtranslator SOURCES tst_qtranslator.cpp