diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-12-05 06:06:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-12-05 06:06:46 (GMT) |
commit | a1640ce50e9350df64fca984a3454a72e31f0ef7 (patch) | |
tree | 80c369d115452d794480734bde2150934bf07602 /src/network | |
parent | 91814c0a9d32b5a306037a73c067c02d3f5be4ff (diff) | |
parent | 235e4fb7316cfe65605c3a035cf3a4f0d167335c (diff) | |
download | Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.zip Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.gz Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging:
Correct client rect calculation for MCL
Symbian: Fix CBA display on application with multiple windows
Fix def files
doc - document symbian behaviour of QFile::link
Symbian - prefer sessions started by this process to choose proxy
Freezing Def files in Qt
Lightmaps demo Symbian fix
CBA comes on top of option menu
Fix memory leaks in OpenVG and OpenGL resource pools
Fix sqlite driver memory eating due to close failure
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qnetworkproxy_symbian.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkproxy_symbian.cpp b/src/network/kernel/qnetworkproxy_symbian.cpp index 73068d6..e96c372 100644 --- a/src/network/kernel/qnetworkproxy_symbian.cpp +++ b/src/network/kernel/qnetworkproxy_symbian.cpp @@ -60,6 +60,7 @@ #include <QtNetwork/QNetworkConfigurationManager> #include <QtNetwork/QNetworkConfiguration> #include <QFlags> +#include <QtCore/private/qcore_symbian_p.h> using namespace CommsDat; @@ -73,6 +74,25 @@ public: void setIapId(TUint32 iapId) { valid = true; id = iapId; } bool isValid() { return valid; } TUint32 iapId() { return id; } + static SymbianIapId fromConfiguration(const QNetworkConfiguration& config) + { + SymbianIapId iapId; + // Note: the following code assumes that the identifier is in format + // I_xxxx where xxxx is the identifier of IAP. This is meant as a + // temporary solution until there is a support for returning + // implementation specific identifier. + const int generalPartLength = 2; + QString idString(config.identifier().mid(generalPartLength)); + bool success; + uint id = idString.toUInt(&success); + if (success) + iapId.setIapId(id); + else + qWarning() << "Failed to convert identifier to access point identifier: " + << config.identifier(); + return iapId; + } + private: bool valid; TUint32 id; @@ -122,9 +142,16 @@ QNetworkConfiguration SymbianProxyQuery::findCurrentConfigurationFromServiceNetw QNetworkConfiguration SymbianProxyQuery::findCurrentConfiguration(QNetworkConfigurationManager& configurationManager) { + QList<TUint32> openConfigurations = QSymbianSocketManager::instance().activeConnections(); QList<QNetworkConfiguration> activeConfigurations = configurationManager.allConfigurations( QNetworkConfiguration::Active); + for (int i = 0; i < activeConfigurations.count(); i++) { + // get first configuration which was opened by this process + if (openConfigurations.contains(SymbianIapId::fromConfiguration(activeConfigurations.at(i)).iapId())) + return activeConfigurations.at(i); + } if (activeConfigurations.count() > 0) { + // get first active configuration opened by any process return activeConfigurations.at(0); } else { // No active configurations, try default one |