From d52a5537548a8df81b5cfcb74d040ee783fe7c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 3 Mar 2020 16:36:37 +0100 Subject: Bearer management deprecation cleanup For QNAM: Deprecate the to-be-unused enum and mark the property deprecated in docs For bearermanagement: Add a warning on the bearermanagement documentation page that it is deprecated. Change-Id: I2cbe12ddec444d9f704601f07f3a7c9b70dc4f3c Reviewed-by: Timur Pocheptsov --- src/network/access/qnetworkaccessmanager.cpp | 2 ++ src/network/access/qnetworkaccessmanager.h | 15 ++++++++++++++- src/network/doc/src/bearermanagement.qdoc | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 695f022e4b..a8cf983ec9 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -253,6 +253,7 @@ static void ensureInitialized() /*! \enum QNetworkAccessManager::NetworkAccessibility + \obsolete Indicates whether the network is accessible via this network access manager. @@ -268,6 +269,7 @@ static void ensureInitialized() /*! \property QNetworkAccessManager::networkAccessible \brief whether the network is currently accessible via this network access manager. + \obsolete \since 4.7 diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index a75b16a6ca..12c7a7cea1 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -92,12 +92,15 @@ public: }; #ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section - enum NetworkAccessibility { + enum QT_DEPRECATED_VERSION_5_15 NetworkAccessibility { UnknownAccessibility = -1, NotAccessible = 0, Accessible = 1 }; +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED Q_ENUM(NetworkAccessibility) +QT_WARNING_POP #endif explicit QNetworkAccessManager(QObject *parent = nullptr); @@ -151,8 +154,11 @@ public: QT_DEPRECATED_VERSION_5_15 QNetworkConfiguration configuration() const; QT_DEPRECATED_VERSION_5_15 QNetworkConfiguration activeConfiguration() const; +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QT_DEPRECATED_VERSION_5_15 void setNetworkAccessible(NetworkAccessibility accessible); QT_DEPRECATED_VERSION_5_15 NetworkAccessibility networkAccessible() const; +QT_WARNING_POP #endif #ifndef QT_NO_SSL @@ -188,7 +194,14 @@ Q_SIGNALS: #ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section QT_DEPRECATED_VERSION_5_15 void networkSessionConnected(); +#ifndef Q_MOC_RUN // moc has trouble with the expansion of these macros +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +#endif QT_DEPRECATED_VERSION_5_15 void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible); +#ifndef Q_MOC_RUN // moc has trouble with the expansion of these macros +QT_WARNING_POP +#endif #endif protected: diff --git a/src/network/doc/src/bearermanagement.qdoc b/src/network/doc/src/bearermanagement.qdoc index f8d6a807d2..8aec894269 100644 --- a/src/network/doc/src/bearermanagement.qdoc +++ b/src/network/doc/src/bearermanagement.qdoc @@ -31,6 +31,8 @@ \title Bearer Management \brief An API to control the system's connectivity state. +\warning Bearer management is deprecated and will be removed in Qt 6.0. + Bearer Management controls the connectivity state of the system so that the user can start or stop interfaces or roam transparently between access points. -- cgit v1.2.3