summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/networksettings/connman/qnetworksettingsmanager_p.cpp b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
index 4503f4d..36dddfe 100644
--- a/src/networksettings/connman/qnetworksettingsmanager_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
@@ -260,11 +260,21 @@ void QNetworkSettingsManagerPrivate::onServicesChanged(ConnmanMapStructList chan
emit q->servicesChanged();
if (auto service = m_unnamedServices.take(path))
- if (!service->placeholderState())
+ if (!service->placeholderState()) {
+ disconnect(service, &QNetworkSettingsService::nameChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ disconnect(service, &QNetworkSettingsService::typeChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
service->deleteLater();
+ }
if (auto service = m_unknownServices.take(path))
- if (!service->placeholderState())
+ if (!service->placeholderState()) {
+ disconnect(service, &QNetworkSettingsService::nameChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ disconnect(service, &QNetworkSettingsService::typeChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
service->deleteLater();
+ }
m_unnamedServicesForSsidConnection.remove(path); // do not delete here
}