make sure to signal only changed configurations

really use this

Change-Id: I082f8d84da572a2c51f67355dcbc06394940c421
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Lorn Potter 2013-10-21 10:38:09 +10:00 committed by The Qt Project
parent 9518c17837
commit bfe005a888

View File

@ -350,7 +350,7 @@ void QConnmanEngine::configurationChange(const QString &id)
QMutexLocker locker(&mutex);
if (accessPointConfigurations.contains(id)) {
bool changed = false;
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
QString servicePath = serviceFromId(id);
@ -368,17 +368,21 @@ void QConnmanEngine::configurationChange(const QString &id)
if (ptr->name != networkName) {
ptr->name = networkName;
changed = true;
}
if (ptr->state != curState) {
ptr->state = curState;
changed = true;
}
ptr->mutex.unlock();
locker.unlock();
emit configurationChanged(ptr);
locker.relock();
if (changed) {
locker.unlock();
emit configurationChanged(ptr);
locker.relock();
}
}
locker.unlock();