summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-15 03:03:24 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-15 03:03:24 (GMT)
commit21aeae2a2258ab8e5083a0607c3b98579bf6fc58 (patch)
treee4ae03f88c77e36a1cede9f68fef010cd4575fdd /src
parent2d23e45c94b6115db2b1efadfe77841f481545ca (diff)
downloadQt-21aeae2a2258ab8e5083a0607c3b98579bf6fc58.zip
Qt-21aeae2a2258ab8e5083a0607c3b98579bf6fc58.tar.gz
Qt-21aeae2a2258ab8e5083a0607c3b98579bf6fc58.tar.bz2
Expand documentation for QNAM::setConfiguration() and friends.
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index d9ad085..69b57e5 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -710,9 +710,25 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
/*!
\since 4.7
- Sets the network configuration that will be used when creating a network session to \a config.
+ Sets the network configuration that will be used when creating the
+ \l {QNetworkSession}{network session} to \a config.
- \sa configuration()
+ 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().
+
+ \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 2
+
+ 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:
+
+ \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 3
+
+ \sa configuration(), QNetworkSession
*/
void QNetworkAccessManager::setConfiguration(const QNetworkConfiguration &config)
{
@@ -722,9 +738,10 @@ void QNetworkAccessManager::setConfiguration(const QNetworkConfiguration &config
/*!
\since 4.7
- Returns the network configuration.
+ Returns the network configuration that will be used to create the
+ \l {QNetworkSession}{network session} which will be used when processing network requests.
- \sa setConfiguration()
+ \sa setConfiguration(), activeConfiguration()
*/
QNetworkConfiguration QNetworkAccessManager::configuration() const
{
@@ -741,6 +758,14 @@ QNetworkConfiguration QNetworkAccessManager::configuration() const
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.
+
\sa configuration()
*/
QNetworkConfiguration QNetworkAccessManager::activeConfiguration() const