summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbt.pri
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-11-26 18:04:58 +0100
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-12-10 13:41:42 +0000
commit5e73fbe10d14cc1fedba4c2e327ebf2b07bc1a9e (patch)
tree1ed50be64e67a40530f1ea41702c5ee29fea2977 /src/bluetooth/osx/osxbt.pri
parent2402bb9421ab8ba4479b7a4e9566b682146f70ff (diff)
qlowenergycontroller_osx - move delegate to the qt_LE_queue
ATM CBCentralManager's delegate does its work on the main queue. With CoreFoundation event dispatcher it's now possible to use QtBluetooth from non-gui thread (more generally - from a thread other than main). This makes main queue useless - and we have to move to a dedicated dispatch queue. Also, we have to make sure we do not have race conditioins/dead-locks. This patch: 1. decouples OSXBTLECentralManager and QLowEnergyController so that these two objects working (potentially) on different threads do not share any data and do not have to use locks, removes the explicit 'delegate' interface/inheritance and replaces them with LECentralNotifier class - to be able to use Qt's signal/slot mechanics for inter-thread communication. 2. all OSXBTLECentralManager's are now executed on qt_LE_queue queue to avoid any race-conditions (since they potentially update manager's internal state). 3. Results/errors are now reported using LECentralNotifier's object (QLowEnergyController has corresponding slots connected to the notifier) Task-number: QTBUG-49476 Change-Id: Ie07cdc13ad559c96a7d2ff010843fb7bcce07c99 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/osx/osxbt.pri')
-rw-r--r--src/bluetooth/osx/osxbt.pri8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bluetooth/osx/osxbt.pri b/src/bluetooth/osx/osxbt.pri
index 06389fcc..bb382866 100644
--- a/src/bluetooth/osx/osxbt.pri
+++ b/src/bluetooth/osx/osxbt.pri
@@ -1,4 +1,4 @@
-SOURCES += osx/uistrings.cpp
+SOURCES += osx/uistrings.cpp osx/osxbtnotifier.cpp
PRIVATE_HEADERS += osx/uistrings_p.h
CONFIG(osx) {
@@ -15,7 +15,8 @@ CONFIG(osx) {
osx/osxbtobexsession_p.h \
osx/osxbtledeviceinquiry_p.h \
osx/corebluetoothwrapper_p.h \
- osx/osxbtcentralmanager_p.h
+ osx/osxbtcentralmanager_p.h \
+ osx/osxbtnotifier_p.h
OBJECTIVE_SOURCES += osx/osxbtutility.mm \
osx/osxbtdevicepair.mm \
@@ -34,7 +35,8 @@ CONFIG(osx) {
PRIVATE_HEADERS += osx/osxbtutility_p.h \
osx/osxbtledeviceinquiry_p.h \
osx/corebluetoothwrapper_p.h \
- osx/osxbtcentralmanager_p.h
+ osx/osxbtcentralmanager_p.h \
+ osx/osxbtnotifier_p.h
OBJECTIVE_SOURCES += osx/osxbtutility.mm \
osx/osxbtledeviceinquiry.mm \