diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-01-19 00:59:57 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-03 06:56:51 (GMT) |
commit | 2149a313e671b22382828b58d2520807a5a061e1 (patch) | |
tree | 121046c40628923101fc5407bcafaeb48b2dc2a2 /src/network/access/qnetworkaccessmanager.cpp | |
parent | 28f95681f4a6fc2e95180f573b658637a82c4c12 (diff) | |
download | Qt-2149a313e671b22382828b58d2520807a5a061e1.zip Qt-2149a313e671b22382828b58d2520807a5a061e1.tar.gz Qt-2149a313e671b22382828b58d2520807a5a061e1.tar.bz2 |
Progress.
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 38ab1c6..b8edefa 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -349,8 +349,8 @@ QNetworkAccessManager::QNetworkAccessManager(QObject *parent) { ensureInitialized(); - d_func()->session = - new QNetworkSession(QNetworkConfigurationManager().defaultConfiguration(), this); + QNetworkConfigurationManager manager; + d_func()->session = new QNetworkSession(manager.defaultConfiguration(), this); } /*! @@ -672,7 +672,7 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ /*! \since 4.7 - Sets the network configuration that will be used to \a config. + Sets the network configuration that will be used when creating a network session to \a config. \sa configuration() */ @@ -695,6 +695,22 @@ QNetworkConfiguration QNetworkAccessManager::configuration() const } /*! + \since 4.7 + + Returns the current active network configuration. + + \sa configuration() +*/ +QNetworkConfiguration QNetworkAccessManager::activeConfiguration() const +{ + QNetworkConfigurationManager manager; + + return manager.configurationFromIdentifier( + d_func()->session->sessionProperty(QLatin1String("ActiveConfiguration")).toString()); + +} + +/*! Returns a new QNetworkReply object to handle the operation \a op and request \a req. The device \a outgoingData is always 0 for Get and Head requests, but is the value passed to post() and put() in |