diff options
Diffstat (limited to 'src/bluetooth')
30 files changed, 65 insertions, 114 deletions
diff --git a/src/bluetooth/osx/corebluetoothwrapper_p.h b/src/bluetooth/osx/osxbluetooth_p.h index 1d67c6ba..93842e77 100644 --- a/src/bluetooth/osx/corebluetoothwrapper_p.h +++ b/src/bluetooth/osx/osxbluetooth_p.h @@ -37,8 +37,9 @@ ** ****************************************************************************/ -#ifndef COREBLUETOOTHWRAPPER_P_H -#define COREBLUETOOTHWRAPPER_P_H +#ifndef OSXBLUETOOTH_P_H +#define OSXBLUETOOTH_P_H + // // W A R N I N G @@ -51,37 +52,49 @@ // We mean it. // +#include <QtCore/qglobal.h> + #ifndef QT_OSX_BLUETOOTH -#import <CoreBluetooth/CoreBluetooth.h> +#include <CoreBluetooth/CoreBluetooth.h> #else -#include <QtCore/qglobal.h> +#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12) + +#include <CoreBluetooth/CoreBluetooth.h> +#include <IOBluetooth/IOBluetooth.h> + +#else -// CoreBluetooth with SDK 10.9 seems to be broken: the class CBPeripheralManager is enabled on OS X 10.9, +// CoreBluetooth with SDK 10.9 seems to be broken: the class CBPeripheralManager is enabled on macOS // but some of its declarations are using a disabled enum CBPeripheralAuthorizationStatus // (disabled using __attribute__ syntax and NS_ENUM_AVAILABLE macro). // This + -std=c++11 ends with a compilation error. For the SDK 10.9 we can: -// either undefine NS_ENUM_AVAILABLE macro (it works somehow) and redefine it as an empty sequence of pp-tokens or -// define __attribute__ as an empty sequence. Both solutions look quite ugly. +// 1. either undefine NS_ENUM_AVAILABLE macro (it works somehow) and redefine it as an empty sequence +// of pp-tokens or +// 2. define __attribute__ as an empty sequence. Both solutions look quite ugly. #if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_9) && !QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_10) -#define CB_ERROR_WORKAROUND_REQUIRED -#endif -#ifdef CB_ERROR_WORKAROUND_REQUIRED +// Must be included BEFORE CoreBluetooth.h: +#include <Foundation/Foundation.h> + +#define CB_ERROR_WORKAROUND_REQUIRED #undef NS_ENUM_AVAILABLE #define NS_ENUM_AVAILABLE(_mac, _ios) -#endif -#import <IOBluetooth/IOBluetooth.h> +#endif // SDK version == 10.9 + +// In SDK below 10.12 IOBluetooth.h includes CoreBluetooth.h. +#include <IOBluetooth/IOBluetooth.h> #ifdef CB_ERROR_WORKAROUND_REQUIRED #undef __attribute__ #undef CB_ERROR_WORKAROUND_REQUIRED -#endif +#endif // WORKAROUND -#endif // QT_OSX_BLUETOOTH +#endif // SDK -#endif // COREBLUETOOTHWRAPPER_P_H +#endif // QT_OSX_BLUETOOTH +#endif // OSXBLUETOOTH_P_H diff --git a/src/bluetooth/osx/osxbt.pri b/src/bluetooth/osx/osxbt.pri index bb382866..5ca833cc 100644 --- a/src/bluetooth/osx/osxbt.pri +++ b/src/bluetooth/osx/osxbt.pri @@ -14,7 +14,7 @@ CONFIG(osx) { osx/osxbtsocketlistener_p.h \ osx/osxbtobexsession_p.h \ osx/osxbtledeviceinquiry_p.h \ - osx/corebluetoothwrapper_p.h \ + osx/osxbluetooth_p.h \ osx/osxbtcentralmanager_p.h \ osx/osxbtnotifier_p.h @@ -34,7 +34,7 @@ CONFIG(osx) { } else { PRIVATE_HEADERS += osx/osxbtutility_p.h \ osx/osxbtledeviceinquiry_p.h \ - osx/corebluetoothwrapper_p.h \ + osx/osxbluetooth_p.h \ osx/osxbtcentralmanager_p.h \ osx/osxbtnotifier_p.h diff --git a/src/bluetooth/osx/osxbtcentralmanager_p.h b/src/bluetooth/osx/osxbtcentralmanager_p.h index e64e5baf..3eee2190 100644 --- a/src/bluetooth/osx/osxbtcentralmanager_p.h +++ b/src/bluetooth/osx/osxbtcentralmanager_p.h @@ -55,18 +55,15 @@ #include "qlowenergyservice.h" #include "qbluetoothuuid.h" #include "osxbtutility_p.h" +#include "osxbluetooth_p.h" #include <QtCore/qbytearray.h> #include <QtCore/qglobal.h> #include <QtCore/qqueue.h> #include <QtCore/qhash.h> -// Foundation.h must be included before corebluetoothwrapper_p.h - -// a workaround for a broken 10.9 SDK. #include <Foundation/Foundation.h> -#include "corebluetoothwrapper_p.h" - @class QT_MANGLE_NAMESPACE(OSXBTCentralManager); QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtconnectionmonitor.mm b/src/bluetooth/osx/osxbtconnectionmonitor.mm index 6cbe9b01..dcd38726 100644 --- a/src/bluetooth/osx/osxbtconnectionmonitor.mm +++ b/src/bluetooth/osx/osxbtconnectionmonitor.mm @@ -42,10 +42,6 @@ #include <QtCore/qdebug.h> -// Import, since these headers are not protected from the multiple inclusion. -#import <IOBluetooth/objc/IOBluetoothUserNotification.h> -#import <IOBluetooth/objc/IOBluetoothDevice.h> - QT_BEGIN_NAMESPACE namespace OSXBluetooth { diff --git a/src/bluetooth/osx/osxbtconnectionmonitor_p.h b/src/bluetooth/osx/osxbtconnectionmonitor_p.h index 7f95db87..18ffc86a 100644 --- a/src/bluetooth/osx/osxbtconnectionmonitor_p.h +++ b/src/bluetooth/osx/osxbtconnectionmonitor_p.h @@ -52,14 +52,13 @@ // #include "qbluetoothaddress.h" +#include "osxbluetooth_p.h" #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> @class QT_MANGLE_NAMESPACE(OSXBTConnectionMonitor); -@class IOBluetoothUserNotification; -@class IOBluetoothDevice; QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtdeviceinquiry.mm b/src/bluetooth/osx/osxbtdeviceinquiry.mm index 36a95a5a..0420a67e 100644 --- a/src/bluetooth/osx/osxbtdeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtdeviceinquiry.mm @@ -43,7 +43,6 @@ #include <QtCore/qloggingcategory.h> #include <QtCore/qdebug.h> - QT_BEGIN_NAMESPACE namespace OSXBluetooth { @@ -57,11 +56,7 @@ DeviceInquiryDelegate::~DeviceInquiryDelegate() QT_END_NAMESPACE - -#ifdef QT_NAMESPACE -// We do not want to litter a code with QT_PREPEND_NAMESPACE, right? -using namespace QT_NAMESPACE; -#endif +QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTDeviceInquiry) diff --git a/src/bluetooth/osx/osxbtdeviceinquiry_p.h b/src/bluetooth/osx/osxbtdeviceinquiry_p.h index 13227839..777184f9 100644 --- a/src/bluetooth/osx/osxbtdeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtdeviceinquiry_p.h @@ -51,10 +51,9 @@ // We mean it. // -#include <QtCore/qglobal.h> +#include "osxbluetooth_p.h" -// We have to import objc code (it does not have inclusion guards). -#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h> +#include <QtCore/qglobal.h> #include <Foundation/Foundation.h> #include <IOKit/IOReturn.h> diff --git a/src/bluetooth/osx/osxbtdevicepair.mm b/src/bluetooth/osx/osxbtdevicepair.mm index 737a312f..dbb2fa4b 100644 --- a/src/bluetooth/osx/osxbtdevicepair.mm +++ b/src/bluetooth/osx/osxbtdevicepair.mm @@ -67,10 +67,7 @@ PairingDelegate::~PairingDelegate() QT_END_NAMESPACE - -#ifdef QT_NAMESPACE -using namespace QT_NAMESPACE; -#endif +QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTPairing) diff --git a/src/bluetooth/osx/osxbtdevicepair_p.h b/src/bluetooth/osx/osxbtdevicepair_p.h index 35709734..d5db5e35 100644 --- a/src/bluetooth/osx/osxbtdevicepair_p.h +++ b/src/bluetooth/osx/osxbtdevicepair_p.h @@ -53,15 +53,13 @@ #include "qbluetoothaddress.h" #include "osxbtutility_p.h" +#include "osxbluetooth_p.h" #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "corebluetoothwrapper_p.h" @class QT_MANGLE_NAMESPACE(OSXBTPairing); -@class IOBluetoothDevice; QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtl2capchannel.mm b/src/bluetooth/osx/osxbtl2capchannel.mm index 2d596654..e18e9e25 100644 --- a/src/bluetooth/osx/osxbtl2capchannel.mm +++ b/src/bluetooth/osx/osxbtl2capchannel.mm @@ -45,9 +45,7 @@ #include <QtCore/qloggingcategory.h> #include <QtCore/qdebug.h> -#ifdef QT_NAMESPACE -using namespace QT_NAMESPACE; -#endif +QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTL2CAPChannel) diff --git a/src/bluetooth/osx/osxbtl2capchannel_p.h b/src/bluetooth/osx/osxbtl2capchannel_p.h index 7bc88102..a8a08975 100644 --- a/src/bluetooth/osx/osxbtl2capchannel_p.h +++ b/src/bluetooth/osx/osxbtl2capchannel_p.h @@ -51,11 +51,11 @@ // We mean it. // +#include "osxbluetooth_p.h" + #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "corebluetoothwrapper_p.h" #include <cstddef> @@ -71,8 +71,6 @@ class ChannelDelegate; QT_END_NAMESPACE -@class IOBluetoothDevice; - @interface QT_MANGLE_NAMESPACE(OSXBTL2CAPChannel) : NSObject<IOBluetoothL2CAPChannelDelegate> { QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *delegate; diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index c3f515d0..7b9e7431 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -46,8 +46,6 @@ #include <QtCore/qsysinfo.h> #include <QtCore/qdebug.h> -#include "corebluetoothwrapper_p.h" - QT_BEGIN_NAMESPACE namespace OSXBluetooth { @@ -103,11 +101,7 @@ StringStrongReference uuid_as_nsstring(CFUUIDRef uuid) QT_END_NAMESPACE -#ifdef QT_NAMESPACE - -using namespace QT_NAMESPACE; - -#endif +QT_USE_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) (PrivateAPI) <CBCentralManagerDelegate> - (void)stopScan; diff --git a/src/bluetooth/osx/osxbtledeviceinquiry_p.h b/src/bluetooth/osx/osxbtledeviceinquiry_p.h index 24bf181e..71e8ef53 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtledeviceinquiry_p.h @@ -54,6 +54,7 @@ #include "qbluetoothdevicediscoveryagent.h" #include "qbluetoothdeviceinfo.h" #include "osxbtutility_p.h" +#include "osxbluetooth_p.h" #include <QtCore/qelapsedtimer.h> #include <QtCore/qglobal.h> @@ -62,9 +63,6 @@ #include <Foundation/Foundation.h> -@class CBCentralManager; -@class CBPeripheral; - QT_BEGIN_NAMESPACE class QBluetoothUuid; diff --git a/src/bluetooth/osx/osxbtobexsession.mm b/src/bluetooth/osx/osxbtobexsession.mm index 4e4013f3..9e324405 100644 --- a/src/bluetooth/osx/osxbtobexsession.mm +++ b/src/bluetooth/osx/osxbtobexsession.mm @@ -405,11 +405,7 @@ bool check_abort_event(const OBEXSessionEvent *e, OBEXError &error, OBEXOpCode & QT_END_NAMESPACE -#ifdef QT_NAMESPACE - -using namespace QT_NAMESPACE; - -#endif +QT_USE_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTOBEXSession) (PrivateAPI) diff --git a/src/bluetooth/osx/osxbtobexsession_p.h b/src/bluetooth/osx/osxbtobexsession_p.h index dfb3d48a..78c93452 100644 --- a/src/bluetooth/osx/osxbtobexsession_p.h +++ b/src/bluetooth/osx/osxbtobexsession_p.h @@ -48,15 +48,12 @@ // We mean it. // +#include "osxbluetooth_p.h" + #include <QtCore/qvariant.h> #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "corebluetoothwrapper_p.h" - -@class IOBluetoothOBEXSession; -@class IOBluetoothDevice; @class QT_MANGLE_NAMESPACE(OSXBTOBEXSession); diff --git a/src/bluetooth/osx/osxbtrfcommchannel.mm b/src/bluetooth/osx/osxbtrfcommchannel.mm index b2ee8b64..e929f335 100644 --- a/src/bluetooth/osx/osxbtrfcommchannel.mm +++ b/src/bluetooth/osx/osxbtrfcommchannel.mm @@ -42,9 +42,7 @@ #include "qbluetoothaddress.h" #include "osxbtutility_p.h" -#ifdef QT_NAMESPACE -using namespace QT_NAMESPACE; -#endif +QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTRFCOMMChannel) diff --git a/src/bluetooth/osx/osxbtrfcommchannel_p.h b/src/bluetooth/osx/osxbtrfcommchannel_p.h index 89d765d8..bb615559 100644 --- a/src/bluetooth/osx/osxbtrfcommchannel_p.h +++ b/src/bluetooth/osx/osxbtrfcommchannel_p.h @@ -51,14 +51,13 @@ // We mean it. // +#include "osxbluetooth_p.h" + #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "corebluetoothwrapper_p.h" @class QT_MANGLE_NAMESPACE(OSXBTRFCOMMChannel); -@class IOBluetoothDevice; QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtsdpinquiry.mm b/src/bluetooth/osx/osxbtsdpinquiry.mm index 28dc2342..a1d6af1c 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry.mm +++ b/src/bluetooth/osx/osxbtsdpinquiry.mm @@ -42,12 +42,9 @@ #include "qbluetoothuuid.h" #include "osxbtutility_p.h" - #include <QtCore/qvariant.h> #include <QtCore/qstring.h> -#include "corebluetoothwrapper_p.h" - QT_BEGIN_NAMESPACE namespace OSXBluetooth { @@ -141,10 +138,7 @@ QList<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device) QT_END_NAMESPACE - -#ifdef QT_NAMESPACE -using namespace QT_NAMESPACE; -#endif +QT_USE_NAMESPACE using namespace OSXBluetooth; diff --git a/src/bluetooth/osx/osxbtsdpinquiry_p.h b/src/bluetooth/osx/osxbtsdpinquiry_p.h index ea75e649..6b39634e 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry_p.h +++ b/src/bluetooth/osx/osxbtsdpinquiry_p.h @@ -53,6 +53,7 @@ #include "qbluetoothaddress.h" #include "qbluetoothuuid.h" +#include "osxbluetooth_p.h" #include <QtCore/qglobal.h> #include <QtCore/qlist.h> @@ -60,9 +61,6 @@ #include <Foundation/Foundation.h> @class QT_MANGLE_NAMESPACE(OSXBTSDPInquiry); -@class IOBluetoothSDPServiceRecord; -@class IOBluetoothSDPDataElement; -@class IOBluetoothDevice; QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtservicerecord.mm b/src/bluetooth/osx/osxbtservicerecord.mm index 11dcac88..d12169bb 100644 --- a/src/bluetooth/osx/osxbtservicerecord.mm +++ b/src/bluetooth/osx/osxbtservicerecord.mm @@ -39,14 +39,13 @@ #include "qbluetoothserviceinfo.h" #include "osxbtservicerecord_p.h" +#include "osxbluetooth_p.h" #include <QtCore/qvariant.h> #include <QtCore/qdebug.h> #include <QtCore/qmap.h> #include <QtCore/qurl.h> -#include "corebluetoothwrapper_p.h" - QT_BEGIN_NAMESPACE namespace OSXBluetooth { diff --git a/src/bluetooth/osx/osxbtsocketlistener.mm b/src/bluetooth/osx/osxbtsocketlistener.mm index 5b004f94..52243990 100644 --- a/src/bluetooth/osx/osxbtsocketlistener.mm +++ b/src/bluetooth/osx/osxbtsocketlistener.mm @@ -42,8 +42,6 @@ #include <QtCore/qdebug.h> -#include "corebluetoothwrapper_p.h" - QT_BEGIN_NAMESPACE namespace OSXBluetooth { @@ -56,11 +54,7 @@ SocketListener::~SocketListener() QT_END_NAMESPACE -#ifdef QT_NAMESPACE - -using namespace QT_NAMESPACE; - -#endif +QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTSocketListener) diff --git a/src/bluetooth/osx/osxbtsocketlistener_p.h b/src/bluetooth/osx/osxbtsocketlistener_p.h index 4a362763..afe3eadc 100644 --- a/src/bluetooth/osx/osxbtsocketlistener_p.h +++ b/src/bluetooth/osx/osxbtsocketlistener_p.h @@ -51,14 +51,12 @@ // We mean it. // +#include "osxbluetooth_p.h" + #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -#include <IOBluetooth/Bluetooth.h> -@class IOBluetoothUserNotification; -@class IOBluetoothRFCOMMChannel; -@class IOBluetoothL2CAPChannel; @class QT_MANGLE_NAMESPACE(OSXBTSocketListener); QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/osx/osxbtutility.mm b/src/bluetooth/osx/osxbtutility.mm index ef34b63f..942fed1c 100644 --- a/src/bluetooth/osx/osxbtutility.mm +++ b/src/bluetooth/osx/osxbtutility.mm @@ -47,6 +47,9 @@ #ifndef QT_IOS_BLUETOOTH #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> +#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12, __IPHONE_NA) +#import <CoreBluetooth/CBUUID.h> +#endif #endif diff --git a/src/bluetooth/osx/osxbtutility_p.h b/src/bluetooth/osx/osxbtutility_p.h index 14178162..de3d3ea2 100644 --- a/src/bluetooth/osx/osxbtutility_p.h +++ b/src/bluetooth/osx/osxbtutility_p.h @@ -51,16 +51,14 @@ // We mean it. // +#include "osxbluetooth_p.h" + #include <QtCore/qloggingcategory.h> #include <QtCore/qscopedpointer.h> #include <QtCore/qsysinfo.h> #include <QtCore/qglobal.h> #include <Foundation/Foundation.h> -// Only after Foundation.h! -#include "corebluetoothwrapper_p.h" - -@class CBUUID; QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm index 620833de..63eab2b9 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm @@ -45,6 +45,7 @@ #include "osx/osxbtsdpinquiry_p.h" #include "qbluetoothdeviceinfo.h" #include "osx/osxbtutility_p.h" +#include "osx/osxbluetooth_p.h" #include "osx/uistrings_p.h" #include "qbluetoothhostinfo.h" #include "qbluetoothuuid.h" @@ -58,8 +59,6 @@ #include <QtCore/qlist.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "osx/corebluetoothwrapper_p.h" QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/qbluetoothlocaldevice_osx.mm b/src/bluetooth/qbluetoothlocaldevice_osx.mm index 1d58363d..c005e2ea 100644 --- a/src/bluetooth/qbluetoothlocaldevice_osx.mm +++ b/src/bluetooth/qbluetoothlocaldevice_osx.mm @@ -42,6 +42,7 @@ #include "qbluetoothlocaldevice.h" #include "osx/osxbtdevicepair_p.h" #include "osx/osxbtutility_p.h" +#include "osx/osxbluetooth_p.h" #include <QtCore/qloggingcategory.h> #include <QtCore/qstring.h> @@ -51,8 +52,6 @@ #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "osx/corebluetoothwrapper_p.h" #include <algorithm> diff --git a/src/bluetooth/qbluetoothserver_osx.mm b/src/bluetooth/qbluetoothserver_osx.mm index 1aaa2201..549a07cc 100644 --- a/src/bluetooth/qbluetoothserver_osx.mm +++ b/src/bluetooth/qbluetoothserver_osx.mm @@ -48,6 +48,7 @@ #include "qbluetoothlocaldevice.h" #include "osx/osxbtutility_p.h" +#include "osx/osxbluetooth_p.h" #include "qbluetoothserver.h" #include "qbluetoothsocket.h" @@ -59,8 +60,6 @@ // Import, since Obj-C headers do not have inclusion guards. #include <Foundation/Foundation.h> -// Only after Foundation.h -#include "osx/corebluetoothwrapper_p.h" #include <limits> diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm index 71877fc5..5c4efca2 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm @@ -43,6 +43,7 @@ #include "osx/osxbtsdpinquiry_p.h" #include "qbluetoothhostinfo.h" #include "osx/osxbtutility_p.h" +#include "osx/osxbluetooth_p.h" #include "osx/uistrings_p.h" #include <QtCore/qloggingcategory.h> @@ -53,8 +54,6 @@ #include <QtCore/qlist.h> #include <Foundation/Foundation.h> -// Only after Foundation.h -#include "osx/corebluetoothwrapper_p.h" QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/qbluetoothserviceinfo_osx.mm b/src/bluetooth/qbluetoothserviceinfo_osx.mm index f2cba6cf..d6aa7592 100644 --- a/src/bluetooth/qbluetoothserviceinfo_osx.mm +++ b/src/bluetooth/qbluetoothserviceinfo_osx.mm @@ -42,6 +42,7 @@ #include "qbluetoothserviceinfo.h" #include "qbluetoothdeviceinfo.h" #include "osx/osxbtutility_p.h" +#include "osx/osxbluetooth_p.h" #include <QtCore/qloggingcategory.h> #include <QtCore/qvariant.h> @@ -52,8 +53,6 @@ #include <QtCore/qurl.h> #include <Foundation/Foundation.h> -// Only after Foundation.h: -#include "osx/corebluetoothwrapper_p.h" QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/qbluetoothsocket_p.cpp b/src/bluetooth/qbluetoothsocket_p.cpp index 5ebba4ad..6007b924 100644 --- a/src/bluetooth/qbluetoothsocket_p.cpp +++ b/src/bluetooth/qbluetoothsocket_p.cpp @@ -131,7 +131,7 @@ qint64 QBluetoothSocketPrivate::readData(char *data, qint64 maxSize) Q_Q(QBluetoothSocket); if (state != QBluetoothSocket::ConnectedState) { - errorString = QBluetoothSocket::tr("Cannot write while not connected"); + errorString = QBluetoothSocket::tr("Cannot read while not connected"); q->setSocketError(QBluetoothSocket::OperationError); return -1; } |