diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-23 03:12:44 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-23 03:12:44 (GMT) |
commit | 055fa76e7575be55899127de2d254e0f0e90a1db (patch) | |
tree | 00047ce97412b53a265343a2f5a8bab92410bb7a /src | |
parent | b1c59bde1e29a62141a10f30a15f02bc1d59558b (diff) | |
download | Qt-055fa76e7575be55899127de2d254e0f0e90a1db.zip Qt-055fa76e7575be55899127de2d254e0f0e90a1db.tar.gz Qt-055fa76e7575be55899127de2d254e0f0e90a1db.tar.bz2 |
Make compile on Maemo6.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/bearer/icd/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/bearer/icd/qicdengine.h | 14 | ||||
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.cpp | 9 |
3 files changed, 16 insertions, 9 deletions
diff --git a/src/plugins/bearer/icd/main.cpp b/src/plugins/bearer/icd/main.cpp index b131ccb..ad1a918 100644 --- a/src/plugins/bearer/icd/main.cpp +++ b/src/plugins/bearer/icd/main.cpp @@ -41,7 +41,7 @@ #include "qicdengine.h" -#include <QtNetwork/private/qbearerengine_p.h> +#include <QtNetwork/private/qbearerplugin_p.h> #include <QtCore/qdebug.h> diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h index 30b5711..6ebe40d 100644 --- a/src/plugins/bearer/icd/qicdengine.h +++ b/src/plugins/bearer/icd/qicdengine.h @@ -80,8 +80,6 @@ class QIcdEngine : public QBearerEngine { Q_OBJECT - friend class QNetworkSessionPrivateImpl; - public: QIcdEngine(QObject *parent = 0); ~QIcdEngine(); @@ -98,15 +96,25 @@ public: void deleteConfiguration(const QString &iap_id); -private: + inline QNetworkConfigurationPrivatePointer configuration(const QString &id) + { + QMutexLocker locker(&mutex); + + return accessPointConfigurations.value(id); + } + inline void addSessionConfiguration(QNetworkConfigurationPrivatePointer ptr) { + QMutexLocker locker(&mutex); + accessPointConfigurations.insert(ptr->id, ptr); emit configurationAdded(ptr); } inline void changedSessionConfiguration(QNetworkConfigurationPrivatePointer ptr) { + QMutexLocker locker(&mutex); + emit configurationChanged(ptr); } diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 6cc4a1d..a9e93e0 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -560,7 +560,7 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface() // Add the new active configuration to manager or update the old config - if (!(engine->accessPointConfigurations.contains(privateConfiguration(activeConfig)->id))) + if (!engine->hasIdentifier(privateConfiguration(activeConfig)->id)) engine->addSessionConfiguration(privateConfiguration(activeConfig)); else engine->changedSessionConfiguration(privateConfiguration(activeConfig)); @@ -924,11 +924,10 @@ void QNetworkSessionPrivateImpl::do_open() */ if (publicConfig.type() == QNetworkConfiguration::UserChoice) { - if (!engine->accessPointConfigurations.contains(result)) { + if (!engine->hasIdentifier(result)) { engine->addSessionConfiguration(privateConfiguration(config)); - } else { - QNetworkConfigurationPrivatePointer priv = - engine->accessPointConfigurations.value(result); + } else { + QNetworkConfigurationPrivatePointer priv = engine->configuration(result); QNetworkConfiguration reference; setPrivateConfiguration(reference, priv); copyConfig(config, reference, false); |