summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate-game/connectionhandler.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-07-25 14:42:06 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-07-25 14:42:18 +0200
commit25638b02766ae3109bfc83b3249e6d0dc9e21bdb (patch)
tree8ac8f0cd544dd39da674657940d6c509ea94721c /examples/bluetooth/heartrate-game/connectionhandler.cpp
parentfc2a206322f6190226ebc1f04062f2c9170f0bac (diff)
parentb19148f9a0f820630bd83432d96117e9598c315d (diff)
Merge remote-tracking branch 'gerrit/dev' into btlebtle
Diffstat (limited to 'examples/bluetooth/heartrate-game/connectionhandler.cpp')
-rw-r--r--examples/bluetooth/heartrate-game/connectionhandler.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/examples/bluetooth/heartrate-game/connectionhandler.cpp b/examples/bluetooth/heartrate-game/connectionhandler.cpp
index 40572b71..3388c0a8 100644
--- a/examples/bluetooth/heartrate-game/connectionhandler.cpp
+++ b/examples/bluetooth/heartrate-game/connectionhandler.cpp
@@ -1,12 +1,22 @@
/***************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the QtBluetooth module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -41,6 +51,7 @@
#include "heartrate-global.h"
#include "connectionhandler.h"
#include <QtBluetooth/qtbluetooth-config.h>
+#include <QtCore/qsystemdetection.h>
ConnectionHandler::ConnectionHandler(QObject *parent) : QObject(parent)
{
@@ -50,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;