diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-10-27 13:28:14 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-11-03 13:09:09 +0000 |
commit | 40214a8c8d35bb15cbe6874cc33d90344f4c533c (patch) | |
tree | a9e0b8b644033466ff991600165cbe72327d5af0 /src | |
parent | 37ef963092460be6cf51dda81bffcd068a875165 (diff) |
Reorder the qlowenergycontroller_p.h includes
qlowenergycontroller_p.cpp and qlowenergycontroller_p.h are no longer
universally included by all builds. The project includes the universal
qlowenergycontroller* files across all platforms. To accomplish this
the macOS/iOS specific QLowEnergyControllerPrivate interface moved to
the common qlownergycontrollerbase_p.h.
From this point onwards qlowenergycontroller_p.[cpp|h] contains
the dummy backend only.
Change-Id: If2893a32adfb14f47cf85622e943d5f683ad38da
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/bluetooth.pro | 14 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_osx_p.h | 2 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_p.cpp | 4 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_p.h | 20 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontrollerbase_p.h | 19 |
5 files changed, 24 insertions, 35 deletions
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro index 33dbfc4d..adba1aab 100644 --- a/src/bluetooth/bluetooth.pro +++ b/src/bluetooth/bluetooth.pro @@ -46,7 +46,6 @@ PRIVATE_HEADERS += \ qbluetoothtransferrequest_p.h \ qprivatelinearbuffer_p.h \ qbluetoothlocaldevice_p.h \ - qlowenergycontroller_p.h \ qlowenergycontrollerbase_p.h \ qlowenergyserviceprivate_p.h \ qleadvertiser_p.h \ @@ -115,14 +114,14 @@ qtConfig(bluez) { PRIVATE_HEADERS += qlowenergycontroller_bluezdbus_p.h \ qlowenergycontroller_bluez_p.h - PRIVATE_HEADERS -= qlowenergycontroller_p.h - qtConfig(linux_crypto_api): DEFINES += CONFIG_LINUX_CRYPTO_API } else { DEFINES += QT_BLUEZ_NO_BTLE include(dummy/dummy.pri) SOURCES += \ qlowenergycontroller_p.cpp + + PRIVATE_HEADERS += qlowenergycontroller_p.h } } else:android:!android-embedded { @@ -146,7 +145,6 @@ qtConfig(bluez) { qbluetoothserver_android.cpp \ qlowenergycontroller_android.cpp - PRIVATE_HEADERS -= qlowenergycontroller_p.h PRIVATE_HEADERS += qlowenergycontroller_android_p.h } else:osx { @@ -172,8 +170,6 @@ qtConfig(bluez) { qbluetoothtransferreply_osx_p.h \ qlowenergycontroller_osx_p.h - PRIVATE_HEADERS -= qlowenergycontrollerbase_p.h - SOURCES -= qbluetoothdevicediscoveryagent.cpp SOURCES -= qbluetoothserviceinfo.cpp SOURCES -= qbluetoothservicediscoveryagent.cpp @@ -182,7 +178,6 @@ qtConfig(bluez) { SOURCES -= qlowenergyservice_p.cpp SOURCES -= qlowenergyservice.cpp SOURCES -= qlowenergycontroller.cpp - SOURCES -= qlowenergycontroller_p.cpp SOURCES -= qlowenergycontrollerbase.cpp } else:ios|tvos { DEFINES += QT_IOS_BLUETOOTH @@ -196,8 +191,6 @@ qtConfig(bluez) { PRIVATE_HEADERS += \ qlowenergycontroller_osx_p.h - PRIVATE_HEADERS -= qlowenergycontrollerbase_p.h - include(osx/osxbt.pri) SOURCES += \ qbluetoothlocaldevice_p.cpp \ @@ -229,7 +222,6 @@ qtConfig(bluez) { qbluetoothsocket_winrt.cpp \ qlowenergycontroller_winrt.cpp - PRIVATE_HEADERS -= qlowenergycontroller_p.h PRIVATE_HEADERS += qlowenergycontroller_winrt_p.h lessThan(WINDOWS_SDK_VERSION, 14393) { @@ -248,6 +240,8 @@ qtConfig(bluez) { qbluetoothsocket_p.cpp \ qbluetoothserver_p.cpp \ qlowenergycontroller_p.cpp + + PRIVATE_HEADERS += qlowenergycontroller_p.h } winrt-*-msvc2015 { diff --git a/src/bluetooth/qlowenergycontroller_osx_p.h b/src/bluetooth/qlowenergycontroller_osx_p.h index 5cceb9e6..24b7c6e9 100644 --- a/src/bluetooth/qlowenergycontroller_osx_p.h +++ b/src/bluetooth/qlowenergycontroller_osx_p.h @@ -54,7 +54,7 @@ #include "osx/osxbtperipheralmanager_p.h" #include "qlowenergyserviceprivate_p.h" #include "osx/osxbtcentralmanager_p.h" -#include "qlowenergycontroller_p.h" +#include "qlowenergycontrollerbase_p.h" #include "qlowenergycontroller.h" #include "osx/osxbtnotifier_p.h" #include "osx/osxbtutility_p.h" diff --git a/src/bluetooth/qlowenergycontroller_p.cpp b/src/bluetooth/qlowenergycontroller_p.cpp index 3d1ea1e9..b9f825af 100644 --- a/src/bluetooth/qlowenergycontroller_p.cpp +++ b/src/bluetooth/qlowenergycontroller_p.cpp @@ -38,18 +38,14 @@ ****************************************************************************/ #include "qlowenergycontroller_p.h" -#ifndef QT_IOS_BLUETOOTH #include "dummy/dummy_helper_p.h" -#endif QT_BEGIN_NAMESPACE QLowEnergyControllerPrivateCommon::QLowEnergyControllerPrivateCommon() : QLowEnergyControllerPrivate() { -#ifndef QT_IOS_BLUETOOTH printDummyWarning(); -#endif registerQLowEnergyControllerMetaType(); } diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h index d7c60149..01e9420a 100644 --- a/src/bluetooth/qlowenergycontroller_p.h +++ b/src/bluetooth/qlowenergycontroller_p.h @@ -51,24 +51,6 @@ // We mean it. // -#if defined(QT_OSX_BLUETOOTH) || defined(QT_IOS_BLUETOOTH) - -#include <QtCore/qglobal.h> -#include <QtCore/qobject.h> - -QT_BEGIN_NAMESPACE - -class QLowEnergyControllerPrivate : public QObject -{ -public: - // This class is required to make shared pointer machinery and - // moc (== Obj-C syntax) happy on both OS X and iOS. -}; - -QT_END_NAMESPACE - -#else - #include <qglobal.h> #include <QtCore/QQueue> #include <QtCore/QVector> @@ -130,6 +112,4 @@ public: QT_END_NAMESPACE -#endif // QT_OSX_BLUETOOTH || QT_IOS_BLUETOOTH - #endif // QLOWENERGYCONTROLLERPRIVATE_P_H diff --git a/src/bluetooth/qlowenergycontrollerbase_p.h b/src/bluetooth/qlowenergycontrollerbase_p.h index 27ab47ec..54f306ff 100644 --- a/src/bluetooth/qlowenergycontrollerbase_p.h +++ b/src/bluetooth/qlowenergycontrollerbase_p.h @@ -51,6 +51,23 @@ // We mean it. // +#if defined(QT_OSX_BLUETOOTH) || defined(QT_IOS_BLUETOOTH) + +#include <QtCore/qglobal.h> +#include <QtCore/qobject.h> + +QT_BEGIN_NAMESPACE + +class QLowEnergyControllerPrivate : public QObject +{ +public: + // This class is required to make shared pointer machinery and + // moc (== Obj-C syntax) happy on both OS X and iOS. +}; + +QT_END_NAMESPACE + +#else #include <qglobal.h> #include <QtCore/qobject.h> @@ -163,4 +180,6 @@ protected: QT_END_NAMESPACE +#endif //defined(QT_OSX_BLUETOOTH) || defined(QT_IOS_BLUETOOTH) + #endif // QLOWENERGYCONTROLLERPRIVATEBASE_P_H |