diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-26 21:37:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-26 21:37:46 (GMT) |
commit | a5ac66200f77fd09d4c4ee5af3a9380efce871ad (patch) | |
tree | 46429b3c1c7835d120e4653f863e57079c3fc47e /src/plugins | |
parent | ef4c65fc364a0262389c0497092a0fa5e1f7d4c3 (diff) | |
parent | fe8e118c41c6243ace972647934c90b7f937f60e (diff) | |
download | Qt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.zip Qt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.tar.gz Qt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (61 commits)
Autotest: don't use Q_FUNC_INFO for testing which method got called
fix generated makefile dependencies
Cocoa: Demo browser can get stuck after closing modal dialog
Restore default if to system default on session close.
tst_qmake doesn't need QtGui
Use the full path to qmake in the qmake unit test
qdoc: Fixed erroneous links to QML basic types.
Fixed item view background color in Gtk style
scope fixes and clutter reduction for sql driver projects
I don't know why some linkers can't call this function, so comment it out.
QNetworkSession::close() method now send closed() signal while faking disconnection.
Add the missing license headers to the QString benchmark data
Fix building of qsimd.cpp on Windows CE
Use QElapsedTimer for the benchlib tests.
Properly implement the CPU feature disabling in qsimd.cpp.
Report the detected CPU features in the corelib boilerplate
Detect CPU features on ARM by reading the ELF auxvec.
Split the CPU-detection code into multiple functions for readability
Fixed delivering gestures to a toplevel widget.
Unroll the SSSE3 code even more to avoid the need to keep an extra variable for inverting the result
...
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 47 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.h | 1 |
3 files changed, 35 insertions, 19 deletions
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 3170bf6..8013d30 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -888,12 +888,12 @@ void QNetworkSessionPrivateImpl::close() state = QNetworkSession::Closing; emit stateChanged(state); + // we fake a disconnection, session error is sent + updateState(QNetworkSession::Disconnected); + opened = false; isOpen = false; - // we fake a disconnection, session error is not sent - updateState(QNetworkSession::Disconnected); - icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT); startTime = QDateTime(); } else { diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 1de4c0f..32eb61a 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -102,15 +102,14 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl() // Cancel possible RConnection::Start() Cancel(); iSocketServ.Close(); - - // Close global 'Open C' RConnection - // Clears also possible unsetdefaultif() flags. - setdefaultif(0); - + + // Restore default interface to system default + restoreDefaultIf(); + iConnectionMonitor.Close(); iOpenCLibrary.Close(); #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG - qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and setdefaultif(0))"; + qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and restoreDefaultIf())"; #endif } @@ -523,16 +522,9 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals) Cancel(); // closes iConnection iSocketServ.Close(); - - // Close global 'Open C' RConnection. If OpenC supports, - // close the defaultif for good to avoid difficult timing - // and bouncing issues of network going immediately back up - // because of e.g. select() thread etc. - if (iDynamicUnSetdefaultif) { - iDynamicUnSetdefaultif(); - } else { - setdefaultif(0); - } + + // Restore default interface to system default + restoreDefaultIf(); // If UserChoice, go down immediately. If some other configuration, // go down immediately if there is no reports expected from the platform; @@ -1457,6 +1449,29 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne } } +void QNetworkSessionPrivateImpl::restoreDefaultIf() +{ + QNetworkConfigurationPrivatePointer config = engine->defaultConfiguration(); + + QMutexLocker locker(&config->mutex); + + ifreq ifr; + memset(&ifr, 0, sizeof(ifreq)); + + switch (config->type) { + case QNetworkConfiguration::InternetAccessPoint: + strcpy(ifr.ifr_name, config->name.toUtf8().constData()); + break; + case QNetworkConfiguration::ServiceNetwork: + ifr.ifr_ifru.snap_id = toSymbianConfig(config)->numericId; + break; + default: + ; + }; + + setdefaultif(&ifr); +} + ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl& owner, RConnection& connection) : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection) { diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index aac9321..1b0e968 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -143,6 +143,7 @@ private: void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0); QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const; QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const; + void restoreDefaultIf(); #ifndef QT_NO_NETWORKINTERFACE QNetworkInterface interface(TUint iapId) const; #endif |