From 5a67821b9615b5fc17cab405566a81cc7f554ad4 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 4 Jan 2018 14:37:52 +0100 Subject: QtBluetooth: Fix heartrate-game for QT_PLATFORM_UIKIT QBluetoothLocalDevice::isValid() returns false for iOS/tvOS/watchOS (because Apple does not provide any public API/Framework to implement QBluetoothLocalDevice correctly). Make ConnectionHandler::alive return true for QT_PLATFORM_UIKIT. Task-number: QTBUG-65547 Change-Id: I219fbeadc752b815f8369d332c10a24e70150abb Reviewed-by: Alex Blasche --- examples/bluetooth/heartrate-game/connectionhandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/bluetooth') diff --git a/examples/bluetooth/heartrate-game/connectionhandler.cpp b/examples/bluetooth/heartrate-game/connectionhandler.cpp index 5ab85c85..3388c0a8 100644 --- a/examples/bluetooth/heartrate-game/connectionhandler.cpp +++ b/examples/bluetooth/heartrate-game/connectionhandler.cpp @@ -51,6 +51,7 @@ #include "heartrate-global.h" #include "connectionhandler.h" #include +#include ConnectionHandler::ConnectionHandler(QObject *parent) : QObject(parent) { @@ -60,7 +61,7 @@ ConnectionHandler::ConnectionHandler(QObject *parent) : QObject(parent) bool ConnectionHandler::alive() const { -#ifdef SIMULATOR +#if defined(SIMULATOR) || defined(QT_PLATFORM_UIKIT) return true; #else return m_localDevice.isValid() && m_localDevice.hostMode() != QBluetoothLocalDevice::HostPoweredOff; -- cgit v1.2.3