[Bearer] Try a bit harder to open a network session
The symptoms were made apparent in the xmlpatterns command line utility when trying to use the synchronous HTTP code path in QXmlQuery for fetching schemas. Change-Id: I93b283fdec4b501a5c1fc646f7ddc30d8407f5ae Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
This commit is contained in:
parent
d41c5f9dba
commit
52db71f191
@ -1585,8 +1585,14 @@ bool QNetworkReplyHttpImplPrivate::start()
|
|||||||
q, SLOT(_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)));
|
q, SLOT(_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)));
|
||||||
postRequest();
|
postRequest();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (synchronous) {
|
||||||
|
// Command line applications using the synchronous path such as xmlpatterns may need an extra push.
|
||||||
|
networkSession->open();
|
||||||
|
if (networkSession->waitForOpened()) {
|
||||||
|
postRequest();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user