diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-19 10:06:55 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-19 10:10:24 (GMT) |
commit | 83525ca84ba7adadaeeb65ffa55a6d0f2630caaa (patch) | |
tree | 83a26fc42ba3811baf38776d266d4bf600684715 /src/plugins/bearer | |
parent | b115770cc3bba68740a6848c7ccaed932399aca9 (diff) | |
parent | 4082e4711a1c54947429b15504caf778c6da22d0 (diff) | |
download | Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.zip Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.gz Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
qmake/generators/win32/msbuild_objectmodel.cpp
src/gui/kernel/qgesturemanager.cpp
tools/qdoc3/test/qt-build-docs.qdocconf
tools/qdoc3/test/qt.qdocconf
Changes in qmake/generators/win32/msvc_objectmodel.cpp come
from commit 4ba3dadcae97bfde6216c32cfa339f8f0e0253c7
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 6 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/symbianengine.cpp | 41 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/symbianengine.h | 6 |
3 files changed, 36 insertions, 17 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index c5a39e1..53a5b4d 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1151,10 +1151,10 @@ void QNetworkSessionPrivateImpl::RunL() serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::InvalidConfigurationError; QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; case KErrCancel: // Connection attempt cancelled @@ -1173,10 +1173,10 @@ void QNetworkSessionPrivateImpl::RunL() iError = QNetworkSession::UnknownSessionError; } QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; } @@ -1268,10 +1268,10 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::SessionAbortedError; emit QNetworkSessionPrivate::error(iError); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate iHandleStateNotificationsFromManager = true; emitSessionClosed = true; // Emit SessionClosed after state change has been reported diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index b4dfc4d..33fa508 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -135,10 +135,9 @@ void SymbianEngine::initialize() updateConfigurations(); updateStatesToSnaps(); - updateAvailableAccessPoints(); // On first time updates synchronously (without WLAN scans) + updateAvailableAccessPoints(); // On first time updates (without WLAN scans) // Start monitoring IAP and/or SNAP changes in Symbian CommsDB startCommsDatabaseNotifications(); - iFirstUpdate = false; } SymbianEngine::~SymbianEngine() @@ -790,6 +789,12 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn mutex.unlock(); emit updateCompleted(); mutex.lock(); + } else { + iFirstUpdate = false; + if (iScanInQueue) { + iScanInQueue = EFalse; + updateAvailableAccessPoints(); + } } } @@ -976,7 +981,7 @@ void SymbianEngine::RunL() QMutexLocker locker(&mutex); if (iStatus != KErrCancel) { - // By default, start relistening notifications. Stop only if interesting event occurred. + // By default, start relistening notifications. Stop only if interesting event occured. iWaitingCommsDatabaseNotifications = true; RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int()); switch (event) { @@ -1356,27 +1361,39 @@ AccessPointsAvailabilityScanner::~AccessPointsAvailabilityScanner() void AccessPointsAvailabilityScanner::DoCancel() { iConnectionMonitor.CancelAsyncRequest(EConnMonGetPckgAttribute); + iScanActive = EFalse; + iOwner.iScanInQueue = EFalse; } void AccessPointsAvailabilityScanner::StartScanning() { - if (iOwner.iFirstUpdate) { - // On first update (the mgr is being instantiated) update only those bearers who - // don't need time-consuming scans (WLAN). - // Note: EBearerIdWCDMA covers also GPRS bearer - iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus); + if (!iScanActive) { + iScanActive = ETrue; + if (iOwner.iFirstUpdate) { + // On first update (the mgr is being instantiated) update only those bearers who + // don't need time-consuming scans (WLAN). + // Note: EBearerIdWCDMA covers also GPRS bearer + iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus); + } else { + iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus); + } + + if (!IsActive()) { + SetActive(); + } } else { - iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus); + // Queue scan for getting WLAN info after first request returns + if (iOwner.iFirstUpdate) { + iOwner.iScanInQueue = ETrue; + } } - - if (!IsActive()) - SetActive(); } void AccessPointsAvailabilityScanner::RunL() { QMutexLocker locker(&iOwner.mutex); + iScanActive = EFalse; if (iStatus.Int() != KErrNone) { iIapBuf().iCount = 0; QT_TRYCATCH_LEAVING(iOwner.accessPointScanningReady(false,iIapBuf())); diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h index 7c1076e..337d4d1 100644 --- a/src/plugins/bearer/symbian/symbianengine.h +++ b/src/plugins/bearer/symbian/symbianengine.h @@ -207,6 +207,7 @@ private: // Data TBool iInitOk; TBool iUpdateGoingOn; TBool iUpdatePending; + TBool iScanInQueue; AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner; @@ -234,9 +235,10 @@ protected: // From CActive void DoCancel(); private: // Data - SymbianEngine& iOwner; + SymbianEngine& iOwner; RConnectionMonitor& iConnectionMonitor; - TConnMonIapInfoBuf iIapBuf; + TConnMonIapInfoBuf iIapBuf; + TBool iScanActive; }; QT_END_NAMESPACE |