diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-24 19:35:28 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-24 19:35:28 +0100 |
commit | 042e26bccd2e53447229035c2b31cc1ab853335e (patch) | |
tree | 03a3a3a79d8214c0be2c8c8fce3cb300f42aba9a | |
parent | fc09cbb4e5b3221429e9da8feaf2bb67b73d1557 (diff) | |
parent | d146e48b72cd8d27dd32eda09650c2c645967e4e (diff) | |
download | qtconnectivity-042e26bccd2e53447229035c2b31cc1ab853335e.tar.gz |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Iab12802d94e2ced8b358cbeb3e70ce37d0eeec2b
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry.mm | 4 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp | 8 | ||||
-rw-r--r-- | src/nfc/nfc.pro | 1 | ||||
-rw-r--r-- | src/nfc/qllcpserver.cpp | 2 | ||||
-rw-r--r-- | sync.profile | 13 |
5 files changed, 13 insertions, 15 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index 7b9e7431..55ffc36f 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -226,9 +226,9 @@ QT_USE_NAMESPACE [manager scanForPeripheralsWithServices:nil options:nil]; } // Else we ignore. #if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) - } else if (state == CBManagerStateUnsupported || state == CBManagerStateUnauthorized) { + } else if (cbState == CBManagerStateUnsupported || cbState == CBManagerStateUnauthorized) { #else - } else if (state == CBCentralManagerStateUnsupported || state == CBCentralManagerStateUnauthorized) { + } else if (cbState == CBCentralManagerStateUnsupported || cbState == CBCentralManagerStateUnauthorized) { #endif if (internalState == InquiryActive) { [manager stopScan]; diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp index be9a4e31..1a5df9e7 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp @@ -68,9 +68,17 @@ QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate( pendingStart(false), q_ptr(parent) { + QAndroidJniEnvironment env; adapter = QAndroidJniObject::callStaticObjectMethod("android/bluetooth/BluetoothAdapter", "getDefaultAdapter", "()Landroid/bluetooth/BluetoothAdapter;"); + if (!adapter.isValid()) { + if (env->ExceptionCheck()) { + env->ExceptionDescribe(); + env->ExceptionClear(); + } + qCWarning(QT_BT_ANDROID) << "Device does not support Bluetooth"; + } } QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate() diff --git a/src/nfc/nfc.pro b/src/nfc/nfc.pro index 8e737dd5..0819cc4f 100644 --- a/src/nfc/nfc.pro +++ b/src/nfc/nfc.pro @@ -80,6 +80,7 @@ linux:!android:qtHaveModule(dbus) { } else:android { NFC_BACKEND_AVAILABLE = yes + DEFINES += QT_ANDROID_NFC ANDROID_PERMISSIONS = \ android.permission.NFC ANDROID_BUNDLED_JAR_DEPENDENCIES = \ diff --git a/src/nfc/qllcpserver.cpp b/src/nfc/qllcpserver.cpp index 2bf2a097..66831b9f 100644 --- a/src/nfc/qllcpserver.cpp +++ b/src/nfc/qllcpserver.cpp @@ -41,6 +41,8 @@ #if defined(QT_SIMULATOR) #include "qllcpserver_simulator_p.h" +#elif defined(QT_ANDROID_NFC) +#include "qllcpserver_android_p.h" #else #include "qllcpserver_p_p.h" #endif diff --git a/sync.profile b/sync.profile index 1204b458..d193d5ac 100644 --- a/sync.profile +++ b/sync.profile @@ -4,16 +4,3 @@ ); %moduleheaders = ( # restrict the module headers to those found in relative path ); -# Module dependencies. -# Every module that is required to build this module should have one entry. -# Each of the module version specifiers can take one of the following values: -# - A specific Git revision. -# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) -# - an empty string to use the same branch under test (dependencies will become "refs/heads/master" if we are in the master branch) -# -%dependencies = ( - "qtbase" => "", - "qtdeclarative" => "", - "qtxmlpatterns" => "", - "qtandroidextras" => "", -); |