summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-07-15 12:56:54 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-07-16 08:14:53 (GMT)
commit5cd75f7e89d94cb1d9450ebae81b95c33ab4d1fe (patch)
treec68f5a8d9bc62755e55112dc082d159244c62c39 /src/network/access
parent308b4aa7cdbb55a07c3e988f4e42bdf77e784f93 (diff)
downloadQt-5cd75f7e89d94cb1d9450ebae81b95c33ab4d1fe.zip
Qt-5cd75f7e89d94cb1d9450ebae81b95c33ab4d1fe.tar.gz
Qt-5cd75f7e89d94cb1d9450ebae81b95c33ab4d1fe.tar.bz2
QNAM HTTP: Fix problem with cached files and metaDataChanged()
Reviewed-by: Peter Hartmann (cherry picked from commit 1c34bf050da3c4d6c303e1dd1dad9eb99e7ccbf4)
Diffstat (limited to 'src/network/access')
-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));