summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qdnslookup.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-05-12 08:36:45 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-05-14 12:47:01 -0700
commit0fc0e821f129d064cc1ce92ad71669ffaf005ca2 (patch)
treedbc2f453788dc049e6c85f37faa6bf089acba760 /src/network/kernel/qdnslookup.cpp
parent471f134cdd705f6a3909928f4d9d3703657a5170 (diff)
QDnsLookup: remove the #if QT_CONFIG(thread) check
There's no fallback anywhere, so this class simply doesn't work if threading isn't supported. Writing it is an exercise left for whoever cares for that configuration. Change-Id: I3e3bfef633af4130a03afffd175e6f68a3f4673f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/kernel/qdnslookup.cpp')
-rw-r--r--src/network/kernel/qdnslookup.cpp9
1 files changed, 2 insertions, 7 deletions
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"