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:
parent
9518c17837
commit
bfe005a888
@ -350,7 +350,7 @@ void QConnmanEngine::configurationChange(const QString &id)
|
|||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
|
|
||||||
if (accessPointConfigurations.contains(id)) {
|
if (accessPointConfigurations.contains(id)) {
|
||||||
|
bool changed = false;
|
||||||
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
|
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
|
||||||
|
|
||||||
QString servicePath = serviceFromId(id);
|
QString servicePath = serviceFromId(id);
|
||||||
@ -368,18 +368,22 @@ void QConnmanEngine::configurationChange(const QString &id)
|
|||||||
|
|
||||||
if (ptr->name != networkName) {
|
if (ptr->name != networkName) {
|
||||||
ptr->name = networkName;
|
ptr->name = networkName;
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptr->state != curState) {
|
if (ptr->state != curState) {
|
||||||
ptr->state = curState;
|
ptr->state = curState;
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr->mutex.unlock();
|
ptr->mutex.unlock();
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
emit configurationChanged(ptr);
|
emit configurationChanged(ptr);
|
||||||
locker.relock();
|
locker.relock();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
emit updateCompleted();
|
emit updateCompleted();
|
||||||
|
Loading…
Reference in New Issue
Block a user