diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-05-06 22:31:58 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-05-08 19:15:53 -0700 |
commit | 62a76f993bfbfb80dd8878239bec1647c54cd626 (patch) | |
tree | ca17b3c6ad9979464acba43bc6a50bbaee0ef49a | |
parent | 6534c1b9b0c76883cb4bc21b7709b8572c45ab91 (diff) |
libqtappfw: bluetooth: add missing parameter to powerChanged() signal
Pass along the *state* parameter to the powerChanged signal for reporting
bluetooth state
Change-Id: Idbb283c9c5a46a3ed58f59ffb58983f6e585e3d3
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r-- | bluetooth.cpp | 4 | ||||
-rw-r--r-- | bluetooth.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bluetooth.cpp b/bluetooth.cpp index 3af6ac3..6e21ad1 100644 --- a/bluetooth.cpp +++ b/bluetooth.cpp @@ -56,7 +56,7 @@ void Bluetooth::setPower(bool state) m_power = state; - emit powerChanged(); + emit powerChanged(m_power); } void Bluetooth::setDiscoverable(bool state) @@ -219,7 +219,7 @@ void Bluetooth::onMessageReceived(MessageType type, Message *msg) emit deviceListEvent(msg->replyData()); } else if (this->isPowerResponse(msg)) { m_power = msg->replyData().value("power").toString() == "on"; - emit powerChanged(); + emit powerChanged(m_power); } } diff --git a/bluetooth.h b/bluetooth.h index 41e1719..118516e 100644 --- a/bluetooth.h +++ b/bluetooth.h @@ -55,7 +55,7 @@ class Bluetooth : public QObject bool discoverable() const { return m_discoverable; }; signals: - void powerChanged(); + void powerChanged(bool state); void discoverableChanged(); void connectionEvent(QJsonObject data); |