diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-20 23:16:13 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-20 23:16:13 (GMT) |
commit | 6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48 (patch) | |
tree | 7d7ad331c8c5316924bd5ff3fd7e6ccb21e7cc48 /src/plugins/bearer/symbian/symbianengine.cpp | |
parent | 7b4c273df2401505fe87efdf5d1d73d75993910a (diff) | |
parent | b81201a29a9794ed490098c8eb136464afa12b8a (diff) | |
download | Qt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.zip Qt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.tar.gz Qt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team: (36 commits)
add 4.8 changes created/merged by me
Fixed automatic plugin path resolving for predefined Qt plugins.
Resolve a number of compilation issues with INTEGRITY
runonphone: Include USB serial ports on OS X for CODA, too
Update changelog for Qt 4.8.0
Fix compile issue when building with QT_NO_CONCURRENT and QT_NO_FUTURE
runonphone: Implement traceswitch support for coda
Fix missing clean up stack panic for a new thread in Symbian
Regression in QS60Style when drawing webview scrollbars
Cleanup qwidget_s60.cpp
Fix panic when global QSettings instance needs flusing at app exit
Fix uninitialised variable in temporary files
More accurately determine bearer type for symbian GPRS/3G
Add documentation for Symbian QSettings locations and security
Update QDesktopServices openUrl() documentation on Symbian OS
Mark binaries as SMPSAFE in Symbian
Fix "sbs -c tools2 --what" output for Qt.
Update environment.prf
QS60Style: Make spinboxes and lineedits slightly taller
runonphone: Add a missing space between a message and the file name
...
Diffstat (limited to 'src/plugins/bearer/symbian/symbianengine.cpp')
-rw-r--r-- | src/plugins/bearer/symbian/symbianengine.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index fc2791a..fdfe94a 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -505,8 +505,33 @@ SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL( cpPriv->bearerType = QNetworkConfiguration::Bearer2G; break; case KCommDbBearerWcdma: - cpPriv->bearerType = QNetworkConfiguration::BearerWCDMA; - break; + { + //This is ambiguous, check the network status to find out what the expected connection will be + TUint mode; + TRequestStatus status; + iConnectionMonitor.GetUintAttribute(0, 0, KMobilePhoneNetworkMode, mode, status); + User::WaitForRequest(status); + if (status != KErrNone) + cpPriv->bearerType = QNetworkConfiguration::BearerUnknown; + else switch (mode) { + case EConnMonNetworkModeCdma2000: + cpPriv->bearerType = QNetworkConfiguration::BearerCDMA2000; + break; + case EConnMonNetworkModeWcdma: + case EConnMonNetworkModeTdcdma: + cpPriv->bearerType = QNetworkConfiguration::BearerWCDMA; //includes HSDPA, as this API can't detect it + break; + case EConnMonNetworkModeGsm: + case EConnMonNetworkModeAmps: + case EConnMonNetworkModeCdma95: + cpPriv->bearerType = QNetworkConfiguration::Bearer2G; //includes GPRS and EDGE, Qt API treats them both as 2G + break; + default: + cpPriv->bearerType = QNetworkConfiguration::BearerUnknown; + break; + } + break; + } case KCommDbBearerLAN: cpPriv->bearerType = QNetworkConfiguration::BearerEthernet; break; @@ -1122,6 +1147,13 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent) } ); } + + //update bearer type for 2G/3G connections + TInt bearer; + iConnectionMonitor.GetIntAttribute(connectionId, 0, KBearerInfo, bearer, status); + User::WaitForRequest(status); + if (status == KErrNone) + updateMobileBearerToConfigs(TConnMonBearerInfo(bearer)); } else if (connectionStatus == KConfigDaemonStartingDeregistration) { TUint connectionId = realEvent->ConnectionId(); QNetworkConfigurationPrivatePointer ptr = dataByConnectionId(connectionId); |