From 9793dbcc4ae4f5f0976f819e6a33e82e6b24f50e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 4 May 2012 13:55:45 +0100 Subject: [PATCH] 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 --- src/network/access/qnetworkreplyhttpimpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 5486883..c9ec287 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); -- 2.7.4