Commit dce686c2 authored by Jan Grulich's avatar Jan Grulich
Browse files

Do not remove shared connection when it is disconnected

CCBUG:325945
parent 8f4c0fc2
......@@ -392,10 +392,8 @@ void Model::removeWirelessNetwork(const QString& ssid, const QString& device)
foreach (ModelItem * item, m_items.itemsBySsid(ssid, device)) {
NetworkManager::AccessPoint::Ptr accessPoint;
NetworkManager::WirelessDevice::Ptr wirelessDevice = NetworkManager::findNetworkInterface(item->devicePath()).objectCast<NetworkManager::WirelessDevice>();
if (wirelessDevice) {
accessPoint = wirelessDevice->findAccessPoint(item->specificPath());
}
if (accessPoint && accessPoint->mode() == NetworkManager::AccessPoint::Adhoc &&
if (wirelessDevice && (wirelessDevice->mode() == NetworkManager::WirelessDevice::Adhoc || wirelessDevice->mode() == NetworkManager::WirelessDevice::ApMode) &&
NetworkManager::isWirelessEnabled() && NetworkManager::isWirelessHardwareEnabled()) {
item->setWirelessNetwork(QString());
if (updateItem(item)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment