summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-05-04 12:55:45 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-05-09 17:11:35 (GMT)
commitaba489cb0ae7b17cbf995948647976ccca6c4e5d (patch)
treee18b78f3b998aafbc2a95db3118e5bda987fead9
parent8f026689d57fa282a7d71174d053e8f4c146e418 (diff)
downloadQt-aba489cb0ae7b17cbf995948647976ccca6c4e5d.zip
Qt-aba489cb0ae7b17cbf995948647976ccca6c4e5d.tar.gz
Qt-aba489cb0ae7b17cbf995948647976ccca6c4e5d.tar.bz2
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> (backported from commit 9793dbcc4ae4f5f0976f819e6a33e82e6b24f50e)
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 32225aa..a94bb0f 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -103,7 +103,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
Q_Q(QNetworkReplyImpl);
QObject::connect(session, SIGNAL(error(QNetworkSession::SessionError)),
- q, SLOT(_q_networkSessionFailed()));
+ q, SLOT(_q_networkSessionFailed()), Qt::QueuedConnection);
if (!session->isOpen())
session->open();