diff options
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 90afd2c..d26956f 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -742,6 +742,8 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ return d_func()->postProcess(createRequest(QNetworkAccessManager::DeleteOperation, request)); } +#ifndef QT_NO_BEARERMANAGEMENT + /*! \since 4.7 @@ -858,6 +860,8 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess } } +#endif // QT_NO_BEARERMANAGEMENT + /*! \since 4.7 @@ -915,11 +919,16 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera // Return a disabled network reply if network access is disabled. // Except if the scheme is empty or file://. - if (!d->networkAccessible && !(req.url().scheme() == QLatin1String("file") || + if ( +#ifndef QT_NO_BEARERMANAGEMENT + !d->networkAccessible && +#endif + !(req.url().scheme() == QLatin1String("file") || req.url().scheme().isEmpty())) { return new QDisabledNetworkReply(this, req, op); } +#ifndef QT_NO_BEARERMANAGEMENT if (!d->networkSession && (d->initializeSession || !d->networkConfiguration.isEmpty())) { QNetworkConfigurationManager manager; if (!d->networkConfiguration.isEmpty()) { @@ -934,6 +943,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera if (d->networkSession) d->networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), -1); +#endif QNetworkRequest request = req; if (!request.header(QNetworkRequest::ContentLengthHeader).isValid() && @@ -994,8 +1004,10 @@ void QNetworkAccessManagerPrivate::_q_replyFinished() if (reply) emit q->finished(reply); +#ifndef QT_NO_BEARERMANAGEMENT if (networkSession && q->findChildren<QNetworkReply *>().count() == 1) networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 120000); +#endif } void QNetworkAccessManagerPrivate::_q_replySslErrors(const QList<QSslError> &errors) @@ -1248,6 +1260,7 @@ QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate() { } +#ifndef QT_NO_BEARERMANAGEMENT void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &config) { Q_Q(QNetworkAccessManager); @@ -1328,6 +1341,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession } } } +#endif // QT_NO_BEARERMANAGEMENT QT_END_NAMESPACE |