summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/corewlan
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-20 05:35:29 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-20 07:02:46 (GMT)
commitc4c75ebd65454fd27bffefb4a3468ece20990c86 (patch)
tree3cf53f960be45c31005371a602fe297671c994a5 /src/plugins/bearer/corewlan
parentb64a309f78b684bf3acb49bc6d0e9b93aa2138c5 (diff)
downloadQt-c4c75ebd65454fd27bffefb4a3468ece20990c86.zip
Qt-c4c75ebd65454fd27bffefb4a3468ece20990c86.tar.gz
Qt-c4c75ebd65454fd27bffefb4a3468ece20990c86.tar.bz2
Remove redundant network configuration updates on startup.
The initial list of network configurations was being fetched twice when the bearer management plugins are loaded.
Diffstat (limited to 'src/plugins/bearer/corewlan')
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
index 854dcea..3c24c54 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.h
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -73,6 +73,7 @@ public:
void connectToId(const QString &id);
void disconnectFromId(const QString &id);
+ Q_INVOKABLE void initialize();
Q_INVOKABLE void requestUpdate();
QNetworkSession::State sessionStateForId(const QString &id);
@@ -86,7 +87,6 @@ public:
bool requiresPolling() const;
private Q_SLOTS:
- void init();
void doRequestUpdate();
void networksChanged();
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index f78fc76..02079d6 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -415,8 +415,6 @@ QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
scanThread = new QScanThread(this);
connect(scanThread, SIGNAL(networksChanged()),
this, SLOT(networksChanged()));
-
- QTimer::singleShot(0,this,SLOT(init()));
}
QCoreWlanEngine::~QCoreWlanEngine()
@@ -427,8 +425,10 @@ QCoreWlanEngine::~QCoreWlanEngine()
[listener release];
}
-void QCoreWlanEngine::init()
+void QCoreWlanEngine::initialize()
{
+ QMutexLocker locker(&mutex);
+
if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
listener = [[QNSListener alloc] init];
listener.engine = this;