summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-12-07 21:22:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-12-07 21:22:44 (GMT)
commitca6db4b5b89f627a970e9f4ea489eae38d771f66 (patch)
tree978d3c5a50d03c98efde6e333c0156cb31d75a43 /src/plugins
parent1857040a8993427c8a4ebed8c615cf79c6b46cde (diff)
parentc220a5dd48d440256a1c9cd73221931f6d99dea5 (diff)
downloadQt-ca6db4b5b89f627a970e9f4ea489eae38d771f66.zip
Qt-ca6db4b5b89f627a970e9f4ea489eae38d771f66.tar.gz
Qt-ca6db4b5b89f627a970e9f4ea489eae38d771f66.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team: (37 commits) Fix declarative examples and demos issue on Windows Symbian: allow apps to disable GL multisampling QSqlRelationalTableModel doesn't follow relations on the first column symbian - don't export qsymbianbearer.qtplugin twice Correct client rect calculation for MCL qmlplugindump: Fix missing flush for objects that don't fit a line. qmlplugindump: Avoid reporting types as attaching to themselves. Fix QtDemo declarative examples Correct image paths for dynamicscene Fix stretched font positions in Lion Symbian: Fix CBA display on application with multiple windows Fix def files Fix stack overwrite in QDBusDemarshaller Qt Linguist: Fix crashes fixed error generating wrong introspection string in header output file doc - document symbian behaviour of QFile::link Symbian - prefer sessions started by this process to choose proxy Backport SMP safe initialisation of QNetworkConfigurationManager Remove more "unused variable" warnings QTreeView: fix crash when starting a drag with hidden columns. ...
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp57
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h3
-rw-r--r--[-rwxr-xr-x]src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj0
-rw-r--r--[-rwxr-xr-x]src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj0
4 files changed, 48 insertions, 12 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f5f71cf..58ce8fe 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -64,7 +64,7 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
ipConnectionNotifier(0), ipConnectionStarter(0),
iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false),
iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0),
- iConnectInBackground(false), isOpening(false)
+ iConnectInBackground(false), iCurrentIap(0), isOpening(false)
{
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -77,6 +77,7 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
void QNetworkSessionPrivateImpl::closeHandles()
{
QMutexLocker lock(&mutex);
+ updateCurrentIap(0);
// Cancel Connection Progress Notifications first.
// Note: ConnectionNotifier must be destroyed before RConnection::Close()
// => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
@@ -637,6 +638,8 @@ void QNetworkSessionPrivateImpl::accept()
QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+ updateCurrentIap(iNewRoamingIap);
+
newState(QNetworkSession::Connected, iNewRoamingIap);
}
#endif
@@ -867,19 +870,31 @@ quint64 QNetworkSessionPrivateImpl::activeTime() const
return startTime.secsTo(QDateTime::currentDateTime());
}
-QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 iapId) const
+bool QNetworkSessionPrivateImpl::activeIapId(TUint32& iapId) const
{
- if (iapId == 0) {
- _LIT(KSetting, "IAP\\Id");
- iConnection.GetIntSetting(KSetting, iapId);
+ if (!iConnection.SubSessionHandle())
+ return false;
+ _LIT(KSetting, "IAP\\Id");
+ TInt err = iConnection.GetIntSetting(KSetting, iapId);
+ if (err != KErrNone)
+ return false;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
- // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
- // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
- // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
- // easy WLAN):
- easyWlanTrueIapId(iapId);
+ // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
+ // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
+ // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
+ // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
+ // easy WLAN):
+ easyWlanTrueIapId(iapId);
#endif
+ return true;
+}
+
+QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 iapId) const
+{
+ if (iapId == 0) {
+ bool ok = activeIapId(iapId);
+ if (!ok)
+ return QNetworkConfiguration();
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -1015,6 +1030,20 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
return publicConfig;
}
+void QNetworkSessionPrivateImpl::updateCurrentIap(TUint32 iapId)
+{
+ if (iCurrentIap == iapId)
+ return;
+
+ if (iCurrentIap != 0)
+ QSymbianSocketManager::instance().removeActiveConnection(iCurrentIap);
+
+ iCurrentIap = iapId;
+
+ if (iCurrentIap != 0)
+ QSymbianSocketManager::instance().addActiveConnection(iCurrentIap);
+}
+
void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
@@ -1028,7 +1057,10 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
case KErrNone: // Connection created successfully
{
TInt error = KErrNone;
- QNetworkConfiguration newActiveConfig = activeConfiguration();
+ TUint32 iapId;
+ QNetworkConfiguration newActiveConfig;
+ if (activeIapId(iapId))
+ newActiveConfig = activeConfiguration(iapId);
if (!newActiveConfig.isValid()) {
// RConnection startup was successful but no configuration
// was found. That indicates that user has chosen to create a
@@ -1038,6 +1070,7 @@ void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
error = KErrGeneral;
} else {
QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+ updateCurrentIap(iapId);
}
if (error != KErrNone) {
isOpen = false;
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 17a051e..9e02e5b 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -143,6 +143,8 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
+ bool activeIapId(TUint32 &iapId) const;
+ void updateCurrentIap(TUint32 iapId);
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
#endif
@@ -186,6 +188,7 @@ private: // data
TUint32 iOldRoamingIap;
TUint32 iNewRoamingIap;
+ TUint32 iCurrentIap;
bool isOpening;
diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj
index dedc462..dedc462 100755..100644
--- a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj
+++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj
index 021eed2..021eed2 100755..100644
--- a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj
+++ b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj