summaryrefslogtreecommitdiffstats
path: root/network/wifiadapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'network/wifiadapter.cpp')
-rw-r--r--network/wifiadapter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/network/wifiadapter.cpp b/network/wifiadapter.cpp
index 440e541..98f73fa 100644
--- a/network/wifiadapter.cpp
+++ b/network/wifiadapter.cpp
@@ -83,17 +83,18 @@ bool WifiAdapter::addService(QString id, QJsonObject properties)
return false;
QString ssid = properties.value("name").toString();
+ // Ignore hidden SSIDs or services already added
+ if (m_model->getNetwork(id) || (ssid == ""))
+ return false;
+
QString state = properties.value("state").toString();
int strength = properties.value("strength").toInt();
// Initially support only IPv4 and the first security method found
QString address = properties.value("ipv4").toObject().value("address").toString();
QString security = properties.value("security").toArray().at(0).toString();
- // Ignore hidden SSIDs or services already added
- if (m_model->getNetwork(id) || (ssid == ""))
- return false;
-
- ConnectionProfile *network = new ConnectionProfile(address, security, id, state, ssid, strength);
+ ConnectionProfile *network = new ConnectionProfile(address, security, id, state, ssid,
+ strength, "", "", "", "", "");
m_model->addNetwork(network);
if ((state == "ready") || (state == "online"))