summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-02-06 09:39:17 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-02-06 11:34:30 +0000
commita59972b02fd2c67c41245e76769489bfa887b3e7 (patch)
tree1055e3820fff8b2d3f5da42effb3e8dd48b9f6ab /src/bluetooth/osx
parentf3934083d37149acaa5065dce33fa55bd3dd7c71 (diff)
Bluetooth - check OS X version in runtime
Add OS X version check, compile time check is not enough if Qt is built for older versions. Change-Id: Ieebd3f05f0fd9942516ea1d9b40ee929905cb799 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/osx')
-rw-r--r--src/bluetooth/osx/osxbtdevicepair.mm8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bluetooth/osx/osxbtdevicepair.mm b/src/bluetooth/osx/osxbtdevicepair.mm
index fdb95522..3dfc4d33 100644
--- a/src/bluetooth/osx/osxbtdevicepair.mm
+++ b/src/bluetooth/osx/osxbtdevicepair.mm
@@ -43,6 +43,7 @@
#include "osxbtutility_p.h"
#include <QtCore/qloggingcategory.h>
+#include <QtCore/qsysinfo.h>
#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
@@ -92,10 +93,13 @@ using namespace QT_NAMESPACE;
- (void)dealloc
{
-#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_9, __IPHONE_NA)
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_9)
// Stop also sets a delegate to nil (Apple's docs).
// 10.9 only.
- [m_pairing stop];
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_9)
+ [m_pairing stop];
+ else
+ [m_pairing setDelegate:nil];
#else
[m_pairing setDelegate:nil];
#endif