diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2019-07-18 23:59:08 +0200 |
---|---|---|
committer | Raquel Medina <raquel.medina@konsulko.com> | 2019-07-19 01:39:38 +0200 |
commit | 61d01475342f6811458d1ae70c23aeaed5348143 (patch) | |
tree | 39a2d5a387cd311d75d43012ec1104374f4689fb /network/network.cpp | |
parent | 9d2600f4b4dcbdd3820910967eb00a9b00cd8a17 (diff) |
libqtappfw: network: improve error checks
- include extra checks for error conditions
- remove some tabs and unused variable
Bug-AGL: SPEC-2636
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I28b38c77979175236a7b115a0f4263840c70eb94
Diffstat (limited to 'network/network.cpp')
-rw-r--r-- | network/network.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/network/network.cpp b/network/network.cpp index 679f374..4ce701f 100644 --- a/network/network.cpp +++ b/network/network.cpp @@ -200,9 +200,9 @@ void Network::parseTechnologies(QJsonArray technologies) QJsonObject properties = technology.value("properties").toObject(); QString type = properties.value("type").toString(); - AdapterIf* adapter = findAdapter(type); - if (adapter) - adapter->updateStatus(properties); + AdapterIf* adapter = findAdapter(type); + if (adapter) + adapter->updateStatus(properties); } } @@ -233,7 +233,6 @@ void Network::processEvent(NetworkMessage *nmsg) for (auto value : services) { QJsonObject service = value.toObject(); QString action = service.value("action").toString(); - QString id = service.value("service").toString(); if (action == "changed") { addService(service); } else if (action == "removed") { |