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>
This commit is contained in:
parent
4a1a13a81b
commit
9793dbcc4a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user