summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-09-12 10:56:00 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-09-12 11:46:54 -0700
commit051bf8e79c99699704032b7b943459a30aae22c8 (patch)
treec3cc9d5c0349f2d568028c89ed3d560247939a19 /network
parentee58ffc1da71d296fdae869dbaaa74a1c4a6c664 (diff)
libqtappfw: remove deleteLater instances that aren't usedguppy_6.90.0guppy/6.90.06.90.0
Remove several deleteLater calls that should have been delete's. This should solve race conditions that an object calls deleteLater(), and leaves scope before the QT main loop is called. Outcome of the race condition is that sometimes the memory allocator reallocates it to another message and causes a crash. Bug-AGL: SPEC-1680 Change-Id: Ic83d8c6c204c6e3248bbe9a9def1842e1e384b2b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'network')
-rw-r--r--network/network.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/network/network.cpp b/network/network.cpp
index 7bcf6d0..db4b2b4 100644
--- a/network/network.cpp
+++ b/network/network.cpp
@@ -60,7 +60,7 @@ void Network::connect(QString service)
nmsg->createRequest("connect_service", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::disconnect(QString service)
@@ -72,7 +72,7 @@ void Network::disconnect(QString service)
nmsg->createRequest("disconnect_service", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::input(int id, QString passphrase)
@@ -86,7 +86,7 @@ void Network::input(int id, QString passphrase)
nmsg->createRequest("agent_response", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::power(bool on)
@@ -106,7 +106,7 @@ void Network::enableTechnology(QString type)
nmsg->createRequest("enable_technology", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::disableTechnology(QString type)
@@ -118,7 +118,7 @@ void Network::disableTechnology(QString type)
nmsg->createRequest("disable_technology", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::scanServices(QString type)
@@ -130,7 +130,7 @@ void Network::scanServices(QString type)
nmsg->createRequest("scan_services", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
bool Network::addService(QJsonObject service)
@@ -189,7 +189,7 @@ void Network::getServices()
nmsg->createRequest("services", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::updateWifiStatus(QJsonObject properties)
@@ -235,7 +235,7 @@ void Network::getTechnologies()
nmsg->createRequest("technologies", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
void Network::updateServiceProperties(QJsonObject data)
@@ -311,7 +311,7 @@ void Network::onConnected()
parameter.insert("value", eventIterator.next());
nmsg->createRequest("subscribe", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
getTechnologies();
@@ -328,7 +328,7 @@ void Network::onDisconnected()
parameter.insert("value", eventIterator.next());
nmsg->createRequest("unsubscribe", parameter);
m_mloop->sendMessage(nmsg);
- nmsg->deleteLater();
+ delete nmsg;
}
m_wifi->removeAllNetworks();