diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-04-26 11:48:05 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-05-08 15:04:39 +0000 |
commit | 16e37407cd6ad369d5250de1b9dac83083a45200 (patch) | |
tree | 62222738f61f63035cf85ce9c490570c4a5f316f /src/bluetooth/osx/osxbt.pri | |
parent | 76b6b0544fa71372e98a76a96a9f9b300bb67b7e (diff) |
IO/CoreBluetooth - refactor the code a bit
... to simplify future code de-duplication. In this patch we:
- For simplicity move all C++ delegate classes into their
own header. Since we have to hide Objective-C from C++ compiler
(while compiling *.cpp files), these updated delegates
have to use void * instead of Objective-C classes.
- Introduce a new RAII classes, that work with Objective-C
instances but have a header that can be included into the
*.cpp files, thus making it possible to share *_p.h files with
all back-ends.
I'm also switching to a new naming convention, which will later
propagate to the pre-existing code - given files are already in
a sub-directory 'osx', having a prefix 'osxbt' in a name is
excessive. Now it's becoming 'bt' (include "osx/btsomething.h").
Later 'osx' dir is to be renamed into 'darwin', which is what
it is these days. Namespace OSXBluetooth is to become DarwinBluetooth.
Task-number: QTBUG-75348
Change-Id: Iebaeab7d0c5e672efebab8218debdec761353633
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/osx/osxbt.pri')
-rw-r--r-- | src/bluetooth/osx/osxbt.pri | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bluetooth/osx/osxbt.pri b/src/bluetooth/osx/osxbt.pri index b7ac0535..ae6111ee 100644 --- a/src/bluetooth/osx/osxbt.pri +++ b/src/bluetooth/osx/osxbt.pri @@ -21,7 +21,9 @@ CONFIG(osx) { osx/osxbluetooth_p.h \ osx/osxbtcentralmanager_p.h \ osx/osxbtnotifier_p.h \ - osx/osxbtperipheralmanager_p.h + osx/osxbtperipheralmanager_p.h \ + osx/btraii_p.h \ + osx/btdelegates_p.h OBJECTIVE_SOURCES += osx/osxbtutility.mm \ osx/osxbtdevicepair.mm \ @@ -36,7 +38,9 @@ CONFIG(osx) { osx/osxbtobexsession.mm \ osx/osxbtledeviceinquiry.mm \ osx/osxbtcentralmanager.mm \ - osx/osxbtperipheralmanager.mm + osx/osxbtperipheralmanager.mm \ + osx/btraii.mm + SOURCES += osx/btdelegates.cpp } else { PRIVATE_HEADERS += osx/osxbtutility_p.h \ osx/osxbtledeviceinquiry_p.h \ |