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

Partially revert previous commit, because it won't probably work correctly for Adhoc connections

CCBUG:326060
parent dce686c2
......@@ -392,8 +392,11 @@ 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 (wirelessDevice && (wirelessDevice->mode() == NetworkManager::WirelessDevice::Adhoc || wirelessDevice->mode() == NetworkManager::WirelessDevice::ApMode) &&
if (accessPoint && (accessPoint->mode() == NetworkManager::AccessPoint::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