diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-19 05:08:33 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-19 05:08:33 (GMT) |
commit | d4c43e13d5eef1bd1862539150a694580804d0c7 (patch) | |
tree | 780f6cf65a8f2eef521d077435dca193b48f7e32 | |
parent | 9bee0352ad9d9037c914c517486fe40f497f288a (diff) | |
parent | 3a9028d7ea6f14cf6039e6aba7606c4d71371338 (diff) | |
download | Qt-d4c43e13d5eef1bd1862539150a694580804d0c7.zip Qt-d4c43e13d5eef1bd1862539150a694580804d0c7.tar.gz Qt-d4c43e13d5eef1bd1862539150a694580804d0c7.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:
Fix crash on exit.
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager.cpp | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 23d7800..4c149a2 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -229,8 +229,8 @@ QNetworkConfigurationManager::QNetworkConfigurationManager( QObject* parent ) QNetworkConfigurationManager::~QNetworkConfigurationManager() { QNetworkConfigurationManagerPrivate *priv = connManager(); - - priv->disablePolling(); + if (priv) + priv->disablePolling(); } @@ -245,7 +245,11 @@ QNetworkConfigurationManager::~QNetworkConfigurationManager() */ QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const { - return connManager()->defaultConfiguration(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->defaultConfiguration(); + + return QNetworkConfiguration(); } /*! @@ -275,7 +279,11 @@ QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const */ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const { - return connManager()->allConfigurations(filter); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->allConfigurations(filter); + + return QList<QNetworkConfiguration>(); } /*! @@ -286,7 +294,11 @@ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNe */ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(const QString &identifier) const { - return connManager()->configurationFromIdentifier(identifier); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->configurationFromIdentifier(identifier); + + return QNetworkConfiguration(); } /*! @@ -301,7 +313,11 @@ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier( */ bool QNetworkConfigurationManager::isOnline() const { - return connManager()->isOnline(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->isOnline(); + + return false; } /*! @@ -309,7 +325,11 @@ bool QNetworkConfigurationManager::isOnline() const */ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const { - return connManager()->capabilities(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + return priv->capabilities(); + + return QNetworkConfigurationManager::Capabilities(0); } /*! @@ -328,7 +348,9 @@ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabil */ void QNetworkConfigurationManager::updateConfigurations() { - connManager()->performAsyncConfigurationUpdate(); + QNetworkConfigurationManagerPrivate *priv = connManager(); + if (priv) + priv->performAsyncConfigurationUpdate(); } #include "moc_qnetworkconfigmanager.cpp" |