summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccesshttpbackend.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-07-15 12:56:54 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-07-15 13:04:04 (GMT)
commit1c34bf050da3c4d6c303e1dd1dad9eb99e7ccbf4 (patch)
treec901f239d1d95212d200d8a7bfa3e13cbee1c145 /src/network/access/qnetworkaccesshttpbackend.cpp
parentb9c2853a0fd1876f30a410fe8dac5c477cef9d0e (diff)
downloadQt-1c34bf050da3c4d6c303e1dd1dad9eb99e7ccbf4.zip
Qt-1c34bf050da3c4d6c303e1dd1dad9eb99e7ccbf4.tar.gz
Qt-1c34bf050da3c4d6c303e1dd1dad9eb99e7ccbf4.tar.bz2
QNAM HTTP: Fix problem with cached files and metaDataChanged()
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkaccesshttpbackend.cpp')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index a6c5c02..f617244 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -944,10 +944,10 @@ bool QNetworkAccessHttpBackend::sendCacheContents(const QNetworkCacheMetaData &m
checkForRedirect(status);
- emit metaDataChanged();
-
- // invoke this asynchronously, else Arora/QtDemoBrowser don't like cached downloads
- // see task 250221 / 251801
+ // This needs to be emitted in the event loop because it can be reached at
+ // the direct code path of qnam.get(...) before the user has a chance
+ // to connect any signals.
+ QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
qRegisterMetaType<QIODevice*>("QIODevice*");
QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents));