summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.h
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-10-12 09:43:40 +0200
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2017-10-12 09:43:40 +0200
commitba4058667a21a278a394054fea70595358ac41f2 (patch)
tree64fdae97a11d6db2505029eef98da9e9a8abfb92 /core/btdiscovery.h
parentfa5e685279b66b14d8069b5214890ca7148487ef (diff)
downloadsubsurface-ba4058667a21a278a394054fea70595358ac41f2.tar.gz
mobile: enable switching BT on/off during session.
This commit implements possible switching BT on and off during a session, so not needing a restart of the app when the user forgot to switch it on when starting the app. For this, the following needed to be done: 1) create a handler that reacts on local BT device status changes. 2) repopulate the connection list in the download screen when a BT status change is detected. Notice the subtile change of the Q_INVOKABLE btEnabled() function to a Q_PROPERTY. This gives a nice dynamic behaviour when switching BT on/off with the app open. Fixes: #556 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/btdiscovery.h')
-rw-r--r--core/btdiscovery.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/btdiscovery.h b/core/btdiscovery.h
index 61d03f49b..7a9e9c655 100644
--- a/core/btdiscovery.h
+++ b/core/btdiscovery.h
@@ -46,6 +46,8 @@ public:
void getBluetoothDevices();
#endif
QList<btVendorProduct> getBtDcs();
+ QBluetoothLocalDevice localBtDevice;
+ void BTDiscoveryReDiscover();
private:
static BTDiscovery *m_instance;
@@ -59,7 +61,6 @@ private:
#endif
QList<struct btPairedDevice> btPairedDevices;
- QBluetoothLocalDevice localBtDevice;
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
signals: