From 7321a2c624d1a3bdc0825cf3d09a51643fe83d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 27 Jan 2020 16:34:53 +0100 Subject: QNetworkAccessManager: deprecate bearer related functions In Qt6 QNAM will no longer use bearer in any way so we deprecate it now. Also mark bearermanagement-conditioned sections for removal in Qt6, the _q_networksession property is part of how QNAM passes the QNetworkSession around. Task-number: QTBUG-81609 Change-Id: I04aad9dd96482c6822dffba1b9af7aa58961149c Reviewed-by: Timur Pocheptsov --- src/network/access/qnetworkreplyimpl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/network/access/qnetworkreplyimpl.cpp') diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index a43a29a239..51bb386186 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -45,7 +45,7 @@ #include "QtCore/qcoreapplication.h" #include "QtCore/qdatetime.h" #include "QtNetwork/qsslconfiguration.h" -#include "QtNetwork/qnetworksession.h" +#include "QtNetwork/qnetworksession.h" // ### Qt6: Remove include #include "qnetworkaccessmanager_p.h" #include @@ -88,7 +88,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() return; } -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section Q_Q(QNetworkReplyImpl); // Do not start background requests if they are not allowed by session policy QSharedPointer session(manager->d_func()->getNetworkSession()); @@ -102,7 +102,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() #endif if (!backend->start()) { -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section // backend failed to start because the session state is not Connected. // QNetworkAccessManager will call _q_startOperation again for us when the session // state changes. @@ -132,7 +132,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() #endif return; } else { -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section if (session) { QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)), q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection); @@ -140,7 +140,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() #endif } -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section if (session) { //get notification of policy changes. QObject::connect(session.data(), SIGNAL(usagePoliciesChanged(QNetworkSession::UsagePolicies)), @@ -287,7 +287,7 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData() } } -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section void QNetworkReplyImplPrivate::_q_networkSessionConnected() { Q_Q(QNetworkReplyImpl); @@ -787,7 +787,7 @@ void QNetworkReplyImplPrivate::finished() totalSize = totalSize.toLongLong() + preMigrationDownloaded; if (!manager.isNull()) { -#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section QSharedPointer session (manager->d_func()->getNetworkSession()); if (session && session->state() == QNetworkSession::Roaming && state == Working && errorCode != QNetworkReply::OperationCanceledError) { -- cgit v1.2.3