summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-09-28 11:14:23 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-28 11:14:23 (GMT)
commit38d7fb497eec5491e2d845e7eb5522dafc6ab42b (patch)
tree9b51ec779b10296ce1cc8ebae29d069c1d2edd55 /src/network/kernel
parent2868302626b8a31f44df1068514485a89ec27171 (diff)
parent7b796b4dcdebfba55c4754d241edb334217fc550 (diff)
downloadQt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.zip
Qt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.tar.gz
Qt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qhostinfo.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 7908182..e033689 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -448,14 +448,17 @@ void QHostInfoRunnable::run()
resultEmitter.emitResultsReady(hostInfo);
// now also iterate through the postponed ones
- QMutableListIterator<QHostInfoRunnable*> iterator(manager->postponedLookups);
- while (iterator.hasNext()) {
- QHostInfoRunnable* postponed = iterator.next();
- if (toBeLookedUp == postponed->toBeLookedUp) {
- // we can now emit
- iterator.remove();
- hostInfo.setLookupId(postponed->id);
- postponed->resultEmitter.emitResultsReady(hostInfo);
+ {
+ QMutexLocker locker(&manager->mutex);
+ QMutableListIterator<QHostInfoRunnable*> iterator(manager->postponedLookups);
+ while (iterator.hasNext()) {
+ QHostInfoRunnable* postponed = iterator.next();
+ if (toBeLookedUp == postponed->toBeLookedUp) {
+ // we can now emit
+ iterator.remove();
+ hostInfo.setLookupId(postponed->id);
+ postponed->resultEmitter.emitResultsReady(hostInfo);
+ }
}
}