diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/configure.cmake | 2 | ||||
-rw-r--r-- | src/network/kernel/qdnslookup.cpp | 9 | ||||
-rw-r--r-- | src/network/kernel/qdnslookup_p.h | 2 |
3 files changed, 3 insertions, 10 deletions
diff --git a/src/network/configure.cmake b/src/network/configure.cmake index 0fd3a103b2..a26f979d3c 100644 --- a/src/network/configure.cmake +++ b/src/network/configure.cmake @@ -331,7 +331,7 @@ qt_feature("dnslookup" PUBLIC SECTION "Networking" LABEL "QDnsLookup" PURPOSE "Provides API for DNS lookups." - CONDITION NOT INTEGRITY + CONDITION QT_FEATURE_thread AND NOT INTEGRITY ) qt_feature("gssapi" PUBLIC SECTION "Networking" diff --git a/src/network/kernel/qdnslookup.cpp b/src/network/kernel/qdnslookup.cpp index 3ad19b0660..29f0c4928a 100644 --- a/src/network/kernel/qdnslookup.cpp +++ b/src/network/kernel/qdnslookup.cpp @@ -13,9 +13,7 @@ QT_BEGIN_NAMESPACE -#if QT_CONFIG(thread) Q_GLOBAL_STATIC(QDnsLookupThreadPool, theDnsLookupThreadPool); -#endif static bool qt_qdnsmailexchangerecord_less_than(const QDnsMailExchangeRecord &r1, const QDnsMailExchangeRecord &r2) { @@ -476,9 +474,7 @@ void QDnsLookup::lookup() connect(d->runnable, &QDnsLookupRunnable::finished, this, [this](const QDnsLookupReply &reply) { d_func()->_q_lookupFinished(reply); }, Qt::BlockingQueuedConnection); -#if QT_CONFIG(thread) - theDnsLookupThreadPool()->start(d->runnable); -#endif + theDnsLookupThreadPool->start(d->runnable); } /*! @@ -991,7 +987,6 @@ void QDnsLookupRunnable::run() emit finished(reply); } -#if QT_CONFIG(thread) QDnsLookupThreadPool::QDnsLookupThreadPool() : signalsConnected(false) { @@ -1027,7 +1022,7 @@ void QDnsLookupThreadPool::_q_applicationDestroyed() waitForDone(); signalsConnected = false; } -#endif // QT_CONFIG(thread) + QT_END_NAMESPACE #include "moc_qdnslookup.cpp" diff --git a/src/network/kernel/qdnslookup_p.h b/src/network/kernel/qdnslookup_p.h index 3a8e1a53cb..c1082863cd 100644 --- a/src/network/kernel/qdnslookup_p.h +++ b/src/network/kernel/qdnslookup_p.h @@ -117,7 +117,6 @@ private: QHostAddress nameserver; }; -#if QT_CONFIG(thread) class QDnsLookupThreadPool : public QThreadPool { Q_OBJECT @@ -133,7 +132,6 @@ private: QMutex signalsMutex; bool signalsConnected; }; -#endif // QT_CONFIG(thread) class QDnsRecordPrivate : public QSharedData { |