summaryrefslogtreecommitdiffstats
path: root/bluetooth
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 /bluetooth
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 'bluetooth')
-rw-r--r--bluetooth/bluetooth.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/bluetooth/bluetooth.cpp b/bluetooth/bluetooth.cpp
index cc5f496..d205e7d 100644
--- a/bluetooth/bluetooth.cpp
+++ b/bluetooth/bluetooth.cpp
@@ -48,7 +48,7 @@ void Bluetooth::generic_command(QString verb, QString value)
tmsg->createRequest(verb, parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Bluetooth::setPower(bool state)
@@ -74,7 +74,7 @@ void Bluetooth::setDiscoverable(bool state)
tmsg->createRequest("set_property", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
m_discoverable = state;
@@ -119,7 +119,7 @@ void Bluetooth::connect(QString address, QString uuid)
parameter.insert("uuid", uuid);
tmsg->createRequest("connect", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Bluetooth::connect(QString address)
@@ -138,7 +138,7 @@ void Bluetooth::disconnect(QString address, QString uuid)
parameter.insert("uuid", uuid);
tmsg->createRequest("disconnect", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Bluetooth::disconnect(QString address)
@@ -160,7 +160,7 @@ void Bluetooth::set_avrcp_controls(QString address, QString cmd)
parameter.insert("value", cmd);
tmsg->createRequest("set_avrcp_controls", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Bluetooth::onConnected()
@@ -174,7 +174,7 @@ void Bluetooth::onConnected()
parameter.insert("value", eventIterator.next());
tmsg->createRequest("subscribe", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
// get initial power state
@@ -195,7 +195,7 @@ void Bluetooth::onDisconnected()
parameter.insert("value", eventIterator.next());
tmsg->createRequest("unsubscribe", parameter);
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
}