Obsolete Members for QNetworkAccessManager

The following members of class QNetworkAccessManager are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Types

(obsolete) enum NetworkAccessibility { UnknownAccessibility, NotAccessible, Accessible }

Public Functions

(obsolete) QNetworkConfiguration activeConfiguration() const
(obsolete) QNetworkConfiguration configuration() const
(obsolete) QNetworkAccessManager::NetworkAccessibility networkAccessible() const
(obsolete) void setConfiguration(const QNetworkConfiguration &config)
(obsolete) void setNetworkAccessible(QNetworkAccessManager::NetworkAccessibility accessible)

Signals

(obsolete) void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible)

Member Type Documentation

enum QNetworkAccessManager::NetworkAccessibility

This enum is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Indicates whether the network is accessible via this network access manager.

ConstantValueDescription
QNetworkAccessManager::UnknownAccessibility-1The network accessibility cannot be determined.
QNetworkAccessManager::NotAccessible0The network is not currently accessible, either because there is currently no network coverage or network access has been explicitly disabled by a call to setNetworkAccessible().
QNetworkAccessManager::Accessible1The network is accessible.

See also networkAccessible.

Member Function Documentation

[signal] void QNetworkAccessManager::networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This signal is emitted when the value of the networkAccessible property changes. accessible is the new network accessibility.

Note: Notifier signal for property networkAccessible.

QNetworkConfiguration QNetworkAccessManager::activeConfiguration() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the current active network configuration.

If the network configuration returned by configuration() is of type QNetworkConfiguration::ServiceNetwork this function will return the current active child network configuration of that configuration. Otherwise returns the same network configuration as configuration().

Use this function to return the actual network configuration currently in use by the network session.

This function was introduced in Qt 4.7.

See also configuration().

QNetworkConfiguration QNetworkAccessManager::configuration() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the network configuration that will be used to create the network session which will be used when processing network requests.

This function was introduced in Qt 4.7.

See also setConfiguration() and activeConfiguration().

QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the current network accessibility.

Note: Getter function for property networkAccessible.

This function was introduced in Qt 4.7.

See also setNetworkAccessible().

void QNetworkAccessManager::setConfiguration(const QNetworkConfiguration &config)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Sets the network configuration that will be used when creating the network session to config.

The network configuration is used to create and open a network session before any request that requires network access is process. If no network configuration is explicitly set via this function the network configuration returned by QNetworkConfigurationManager::defaultConfiguration() will be used.

To restore the default network configuration set the network configuration to the value returned from QNetworkConfigurationManager::defaultConfiguration().

Setting a network configuration means that the QNetworkAccessManager instance will only be using the specified one. In particular, if the default network configuration changes (upon e.g. Wifi being available), this new configuration needs to be enabled manually if desired.

 QNetworkConfigurationManager manager;
 networkAccessManager->setConfiguration(manager.defaultConfiguration());

If an invalid network configuration is set, a network session will not be created. In this case network requests will be processed regardless, but may fail. For example:

 networkAccessManager->setConfiguration(QNetworkConfiguration());

This function was introduced in Qt 4.7.

See also configuration() and QNetworkSession.

void QNetworkAccessManager::setNetworkAccessible(QNetworkAccessManager::NetworkAccessibility accessible)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Overrides the reported network accessibility. If accessible is NotAccessible the reported network accessiblity will always be NotAccessible. Otherwise the reported network accessibility will reflect the actual device state.

Note: Setter function for property networkAccessible.

This function was introduced in Qt 4.7.

See also networkAccessible().