diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-03-24 07:49:32 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-03-24 07:49:32 (GMT) |
commit | ca554e4f13bad9a34db9b79617b1991983b5d227 (patch) | |
tree | 21aedabc96b9bcad0cdadb16ef54afa7ccd1e8f0 /src/network/kernel | |
parent | 66813ad3dd429c4a8d58a2b4f8b79d14b8af4356 (diff) | |
parent | 70f711f1db76f2f675f6c0777a693d243199ab88 (diff) | |
download | Qt-ca554e4f13bad9a34db9b79617b1991983b5d227.zip Qt-ca554e4f13bad9a34db9b79617b1991983b5d227.tar.gz Qt-ca554e4f13bad9a34db9b79617b1991983b5d227.tar.bz2 |
Merge branch '4.6' of S:\dynamic\git\qt\trolltech\qt-s60-public.git\ into 4.6
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 1 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 7150fb7..6894978 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -479,6 +479,7 @@ void QHostInfoRunnable::run() QHostInfoLookupManager::QHostInfoLookupManager() : mutex(QMutex::Recursive), wasDeleted(false) { moveToThread(QCoreApplicationPrivate::mainThread()); + connect(QCoreApplication::instance(), SIGNAL(destroyed()), SLOT(waitForThreadPoolDone()), Qt::DirectConnection); threadPool.setMaxThreadCount(5); // do 5 DNS lookups in parallel } diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 2b26b07..4fc74e9 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -184,6 +184,9 @@ protected: QMutex mutex; bool wasDeleted; + +private slots: + void waitForThreadPoolDone() { threadPool.waitForDone(); } }; #endif |