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>
This commit is contained in:
parent
471f134cdd
commit
0fc0e821f1
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user