From cd60b787651ac682595fe40f40c8778c518c5517 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 29 Aug 2018 15:18:32 +1000 Subject: wasm: enable Network for nothread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-70208 Change-Id: Ib73ca0d3c0736336bf517ffb968cbdbab4610319 Reviewed-by: Edward Welbourne Reviewed-by: Morten Johan Sørvig --- src/network/kernel/qhostinfo_p.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/network/kernel/qhostinfo_p.h') diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 82cf34719f..8cce302166 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -61,7 +61,9 @@ #include "QtCore/qobject.h" #include "QtCore/qpointer.h" #include "QtCore/qthread.h" +#if QT_CONFIG(thread) #include "QtCore/qthreadpool.h" +#endif #include "QtCore/qrunnable.h" #include "QtCore/qlist.h" #include "QtCore/qqueue.h" @@ -238,20 +240,25 @@ public: friend class QHostInfoRunnable; protected: +#if QT_CONFIG(thread) QList currentLookups; // in progress QList postponedLookups; // postponed because in progress for same host +#endif QQueue scheduledLookups; // not yet started QList finishedLookups; // recently finished QList abortedLookups; // ids of aborted lookups +#if QT_CONFIG(thread) QThreadPool threadPool; - +#endif QMutex mutex; bool wasDeleted; private slots: +#if QT_CONFIG(thread) void waitForThreadPoolDone() { threadPool.waitForDone(); } +#endif }; QT_END_NAMESPACE -- cgit v1.2.3