summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-05-04 13:55:45 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-09 02:28:10 +0200
commit9793dbcc4ae4f5f0976f819e6a33e82e6b24f50e (patch)
treeefded5535e7563eab3bb42eb48f2571bfdeb6f99
parent4a1a13a81b7e4b8f3d159f7a9b78f93c0a4eca66 (diff)
Avoid emitting finished() before user can connect the signal
QNetworkSession::open can synchronously emit an error, therefore we need to queue this. Otherwise QNetworkReply::finished is emitted before the user has had a chance to connect the signals. Task-number: QTBUG-18824 Change-Id: I703d5e31d2934afafabdf0a77ea3aaf5336e8dec Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 54868836b6..c9ec287c2c 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1569,7 +1569,7 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
if (session) {
QObject::connect(session, SIGNAL(error(QNetworkSession::SessionError)),
- q, SLOT(_q_networkSessionFailed()));
+ q, SLOT(_q_networkSessionFailed()), Qt::QueuedConnection);
if (!session->isOpen()) {
session->setSessionProperty(QStringLiteral("ConnectInBackground"), isBackground);