From 22d20e81d866b79e1e9fefe3f24f93aeb687a450 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Sat, 18 Nov 2017 21:07:44 +0100 Subject: Example heartrate-server needs only core and bluetooth module Fixes compile with disabled gui module. Task-number: QTBUG-64597 Change-Id: I376dede3db987e524f97070344cc119e0ee1d187 Reviewed-by: Alex Blasche --- examples/bluetooth/heartrate-server/heartrate-server.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/bluetooth/heartrate-server/heartrate-server.pro b/examples/bluetooth/heartrate-server/heartrate-server.pro index 4ccf486c..edd011b9 100644 --- a/examples/bluetooth/heartrate-server/heartrate-server.pro +++ b/examples/bluetooth/heartrate-server/heartrate-server.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = heartrate-server -QT += bluetooth +QT = core bluetooth CONFIG += c++11 SOURCES += main.cpp -- cgit v1.2.3 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') 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