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>
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);