summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Bump versionJani Heikkinen2021-03-031-1/+1
| | | | | | | | Change-Id: I12f3b1fcc0adb4a5243717647cba463904676a15
| * Change tst_qlowenergycontroller to wait for disconnectsAndreas Buhr2021-02-263-2/+30
| | | | | | | | | | | | | | | | | | | | | | Many occurrences in tst_qlowenergycontroller exist where disconnectFromDevice() is called but the code did not wait for the disconnect to happen. This patch changes this. Change-Id: I1df4e68136b8a83640af1fc50298e559d983cc9a Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 180f895023f136a694738667a73674968964bafc) Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
| * Correct error handling in QLowEnergyControllerPrivateBluezDBUSAndreas Buhr2021-02-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a DBUS interface was removed for a device, error handling just assumed it was the org.bluez.Device1 interface, without checking. This lead to errors on disconnection if the device has a battery service: The code sends a disconnection request, then an InterfaceRemoved event for org.bluez.Battery1 occurs. This was interpreted as a removal of org.bluez.Device1 which in turn led to the controller going into UnknownRemoteDeviceError error state. This patch adds a check whether it is really org.bluez.Device1 which is removed. Change-Id: I449b29cb9528cda23ce972f36f716a8774f01fe5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit af5f801c6b8de0bf0d21798bddef54cb14759ecd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-24314-6461/+6461
|/ | | | | | | | | | | This reverts commit 0db3b38521e11147cb802798a2cb7811a96029a9. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: Ie82dac4e6a4e2e0e1207d17a10c09701871d6875 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Fix error handling in BlueZ connectToServiceHelperAndreas Buhr2021-02-122-5/+20
| | | | | | | | | | | | | | QBluetoothSocketPrivateBluezDBus uses asynchronous calls, then blocking waits for the result and then does error handling. The blocking wait was missed in one place, rendering the following error handling code dysfunctional. This patch adds the required blocking wait. Fixes: QTBUG-82407 Change-Id: Ia45372e3b6cce3617d6c985fe1800a33631bc0fc Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 7aa19c8a512fdceac12cf4ee6587626e3de61c25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add server role to BlueZ service registrationAndreas Buhr2021-02-121-0/+1
| | | | | | | | | | | | | | | In service registration, a profile is created. This profile had no clien/server flag. If two profiles with the same UUID are created (one for server side, one for client side) this led to the wrong profile being used in connection setup. This patch marks the profile which is created in registerService() as a server profile which prevents it from being used by BlueZ in a client context. Change-Id: I95b22657a7c7e45b334476a8513d79920ba9cc96 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit e74cb54a4cbc8aba188ea48ae3effcf10432df11) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2021-02-02314-6461/+6461
| | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtconnectivity. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in test. Task-number: QTQAINFRA-4159 Change-Id: Icf450df25282ffadf5bcd0950753d17ba6ab57e3 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Bump versionJani Heikkinen2020-10-271-1/+1
| | | | Change-Id: I0a2912baa0e26b2d6953b21de8df7b8a2cf87ae8
* Add changes file for Qt 5.12.10Antti Kokko2020-10-191-0/+28
| | | | | | | Change-Id: I72c9a06d15c3092b898fed708908896ea385034c Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 568c411f2751a97e9cc39f58adfa16f2465c4bae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump versionJani Heikkinen2020-09-281-1/+1
| | | | Change-Id: Id96937c60f416b57016ea753112f0ae9b7dddd52
* QLowEnergyController (Darwin) - restore the logic we had in 5.12Timur Pocheptsov2020-09-091-4/+9
| | | | | | | | | | | | | where serviceDiscovered was invoked via QueuedConnection and the controller was in the correct state for details discovery in case an application wants to discover details in the slot, attached to the serviceDiscovered signal. Change-Id: I3cbd0a0fa9913003d7b1c388a1c3653e04a505b0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 7ff8f2d0546262816ab94684a992428cc2cb8a9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add changes file for Qt 5.15.1Antti Kokko2020-08-251-0/+20
| | | | | | | | | | | | | + 2f46485868a5d9f9a9035db7157864a3f5949a8a Android: Make `Just Works` bonding really work + be75143e7d6d74bf49284746afcbe26c8091f471 Emit requestCompleted only one time on Android + a48a7537f7d226e3980586480e59d0b9733b61f1 Bump version + 70d9d0ce58a88ce3c2e8673e8ea20ba078632e25 Move the check for relevant NFC intents to the MainNfcNewIntentListener + 7a160b16dea1fa26b58f8b2e7c2fc6c96813bfd2 Add binary compatibility files for 5.15 for QtConnectivity Change-Id: Id51454d831205086dc16ce4e3678df85c1527ad7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 6fe502ad842c322981b45632e4f59182be1908d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add binary compatibility files for 5.15 for QtConnectivityMilla Pohjanheimo2020-08-172-0/+10710
| | | | | | | Binary compatibility files added. Change-Id: Ie02eb65a37f1fc1a63218734622770f9cd2c69c4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move the check for relevant NFC intents to the MainNfcNewIntentListenerLars Schmertmann2020-07-312-4/+5
| | | | | | | | | | | | | | The MainNfcNewIntentListener registers itself in QtAndroidPrivate from qtbase to listen for intents. Every listener only needs to return true, if the intent contains expected data. This will cause QtAndroidPrivate to stop notify other listeners. So we need to move the check from QNearFieldManagerPrivateImpl::onTargetDiscovered to MainNfcNewIntentListener::handleNewIntent. Change-Id: Ib5001a4d3746782d7162e02a0ffeee6c370a8826 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 8bc3fb29cbc6a49fdff22915081d356d4d6abfa9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump versionAlexandru Croitor2020-07-301-1/+1
| | | | Change-Id: I6e529929eb0c655b9e7786bfc16e689a5bbe98ba
* Emit requestCompleted only one time on AndroidLars Schmertmann2020-06-171-1/+1
| | | | | | | | | | | NearFieldTarget::sendCommand used handleResponse that delegates the call to setResponseForRequest with emitRequestCompleted = true. But sendCommand also emits requestCompleted by its own. Change-Id: I7121c6149e98af61eb27fc00504ffe12023eb4d4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 19d244a483b8c22f94b61c6a17e5d5d199050aa2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Make `Just Works` bonding really workKonstantin Ritt2020-06-041-0/+66
| | | | | | | | | | | | | | In case bond state has been changed due to access to a restricted handle, Android never completes the operation which triggered the devices to bind and thus never fires on(Characteristic|Descriptor)(Read|Write) callback, causing TimeoutRunnable to interrupt pending job, albeit the read/write job hasn't been actually executed by the peripheral; re-add the currently pending job to the queue's head and re-run it. Change-Id: Idd69c885a439a26e2819746d703a92778370e4ba Reviewed-by: Evgeniy Gagarin <eeiaao@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit b7b40e4222999be5eed5da3239886329c84bf731)
* Merge remote-tracking branch 'origin/5.15.0' into 5.15Qt Forward Merge Bot2020-05-057-24/+109
|\ | | | | | | Change-Id: Ia0a2713a04249d6d52008a9fb751f7f4ee447590
| * Update connects to QSocketNotifier::activatedv5.15.0-rc2v5.15.0-rc1v5.15.0Mårten Nordheim2020-04-292-5/+5
| | | | | | | | | | | | | | | | The int-overload produces a warning Task-number: QTBUG-70441 Change-Id: I1c787e0a5852388d5a08630a51189f9c0661968e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15.0"Qt Forward Merge Bot2020-04-294-19/+79
| |\
| | * Merge remote-tracking branch 'origin/5.14' into 5.15.0Qt Forward Merge Bot2020-04-274-19/+79
| |/| |/| | | | | | | | Change-Id: Iab21a9155cd4b1cba4c65332fff02df9c149f57a
| | * Merge remote-tracking branch 'origin/5.14.2' into 5.145.14Qt Forward Merge Bot2020-04-211-0/+49
| | |\ | | | | | | | | | | | | Change-Id: I12dbdbb7720b071121f947e4be921949b76d81d9
| | | * Add changes file for Qt 5.14.2v5.14.2Antti Kokko2020-03-171-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 00f7f8514f3415bb68d964af18482f47c0d5c94d Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4 + db6cd4110594abe09079ed4106d8fd30a848efa4 Bump version + f4c68cb2fc894f1ff5a9271637d006095c2274d1 winrt: set proper state on service detail discovery fail + 0bb394194aad69574b98de5b43da82b0f0a4a454 winrt: Avoid possible hang in QBluetoothServer::hasPendingConnections + b9502e498c1033b8334afca7808807d3b6f00926 "Fix" heartrate-server on Android + 76d98250d46b4afa3d83b550bd26b33021928310 Catch turned off Bluetooth adapter when stopping LE discovery + fd48361a193889cdc25af8aeb311acc8ad85fa26 Add location-turned-on check before starting device discovery + c81430b704e17d2f2eb5445e261ab3753bef3328 Ensure that a failing classic discovery doesn't prevent LE scan + 0c8f3eb35eead6e4db7732020d7fb2863ba3787f Grant ACCESS_FINE_LOCATION to QtBluetooth + a2769b323dc890def9dffaf98c768cec12eba3c0 Suppress deployment-settings files on Android + 0282c2fc4ae437cb4f549f25f3e748a90e64f864 Android: Ensure that LE errors are forwarded from JNI to Qt Change-Id: I1fad98c115f7a78b96ecc7fe314166d82f52ce01 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * | Fix the documentation for QtNFC in services on AndroidLars Schmertmann2020-04-081-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is already possible to use QtNFC in Android services since Qt 5.9. Fixes: QTBUG-57646 Change-Id: Ib3d8a8101982cd9bf5e7c529d45491b49fede96d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * | QLowEnergyControllerPrivateWinRT::connectToDevice: Return early if LE device ↵Oliver Wolff2020-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cannot be found If the host does not support BTLE, connectToDevice will fail and mDevice will be zero. The return in this case was missing so that we tried to access a null pointer and caused an exception. Change-Id: Iba973f3980a2ecbb82d2cb6dd8d0f60a5bdf4890 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * | Android: Re-use `pendingJob` storage introduced by 962f282d21e62b8dKonstantin Ritt2020-03-241-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to make the code less error prone Change-Id: I429bf367c9d44f24356f4ee70c0f6045b0557604 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * | Android: Fix out-of-sync access introduced by 962f282d21e62b8dKonstantin Ritt2020-03-241-1/+2
| | |/ | | | | | | | | | | | | | | | Change-Id: Id45e5ed41bf97dc9940c5047e4e7a046e65d62bd Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * / Add changes file for Qt 5.15.0Alex Blasche2020-04-291-0/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 75bb24bf9efc771d8462a3ee69ace6b398f8515f Bump version + ae018d2832191e34ac90048931b66280fab64f93 Rename qlowenergycontroller_p... to qlowenergycontroller_dummy + fe55e2de44bcd2bb56d864ba94bbd9a5e5df722e Remove usage of PRIVATE_ and PUBLIC_HEADERS + 1a32211d8df7b0f06c75707b1bec029f48789d16 imports/nfc.pro: Remove QDeclarativeNearFieldSocket + 6a31d209fdf707a36b96ea6163742af0edcac563 examples/nfc/poster: Remove empty "icons" prefix + d74b56ac4bf88baa030e786bfa41a50c02de0a25 QBluetoothSocket(macOS) - fix _q_writeNotify's invocation + d7c9ef9f3f4ddc6b7578a0da41532c210f208f5b QBluetoothDeviceInfo: Use a QMultiHash internally + 44f9f5a52f0c4a2ea3bc3a5b75f2ec0829f6ee95 QNearFieldTarget: Fix deprecation warning + 96cf13fe8e89f89247ed10c86521072da5d9ca40 QLowEnergyController/Windows: Fix warning about ignored qualifiers + 767947bd8633d301ca3183b49f8096e30c30d180 QBluetoothDeviceDiscoveryAgent/Windows: Fix deprecation warnings + ddbba380be9b92606898aca7452f723c249da75e Update plugins.qmltypes for 5.15 + 6857c4b509cae7112aa9ead02ac8c418cf53d1cc Use Qt::SplitBehavior in preference to QString::SplitBehavior Change-Id: I854e42b3d4dc4d5ae0df9a22a2dfac45f5a14a60 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta4v5.15.0-beta3v5.15.0-beta2Qt Forward Merge Bot2020-03-076-48/+162
|\| | | | | | | Change-Id: I037246140f5c52dde3335952d4bf77e43b1c3503
| * support building with clang and libc++Denis Pronin2020-03-051-0/+1
| | | | | | | | | | | | | | fixed undefined errno when compiling with clang++ and libc++ Change-Id: I30be6e2da36f9189261535f103ce689462634f49 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Also add a response for a request if reportError is calledLars Schmertmann2020-03-052-9/+11
| | | | | | | | | | | | | | | | | | | | | | When using QNearFieldTarget::sendCommand on Android an exception can occur. In this case reportError is called and handleResponse is omitted. A call to QNearFieldTarget::waitForRequestCompleted will result in a full usage of the specified timeout, even if the exception occurred. To avoid this behavior also add an (invalid) response in reportError. Change-Id: Id80b7a97da5628d229b942803ec1a2fb13536d99 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix a race condition between a write and an incoming changeThiemo van Engelen2020-03-031-36/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android API that is available to write to a characteristic requires the user to first set the new value of the characteristic and then tell Android to write the value to the device. If the phone processes an incoming change for this same characteristic in between the setting of the value and the actual write, it could happen that the characteristic gets the incoming value and that incoming value is then sent to the connected device. Something similar could occur for the incoming change as the received value is not passed in the callback but it is set on the characteristic and the user is expected to read the received value from the characteristic. To prevent these problems, a new connectGatt function that takes a Handler as extra argument was added to SDK v26. The callbacks are then always executed via this handler and thus on the associated handler thread. If the user also performs all writes on this thread, the described race condition can no longer occur. This could have solved the problems, but Android 8.0 contained a race condition in the callback part because it set the value of the characteristic before passing the callback to the handler, still allowing the same race condition for incoming changed. This was fixed in Android 8.1. This commit causes the code to use a Handler and the new connectGatt function if it is running on SDK >= 27, which is associated with Android 8.1. For older SDK versions, a different solution is implemented. In this case, a temporary BluetoothGattCharacteristic is instantiated that can hold the value to be written. This way, the write can no longer interfere with changes that are being received. To instantiate the BluetoothGattCharacteristic, a private constructor is invoked using reflection. This private constructor is needed as only this constructor allows to create an instance that has the required information for Android to be able to write to the charatceristic (such as the associated service and instanceId). This is also the reason why this solution cannot be used on newer SDK's as this constructor is blacklisted and a warning box will be shown when reflection is used to get a reference to it. Because a temporary BluetoothGattCharacteristic is instantiated that holds the written value, it is necessary to store the value that was written and pass that in the callback. More information on these Android issues and solution direction can be found here: https://stackoverflow.com/questions/38922639/how-could-i-achieve-maximum-thread-safety-with-a-read-write-ble-gatt-characteris https://medium.com/@martijn.van.welie/making-android-ble-work-part-3-117d3a8aee23 Change-Id: I5a9eda501a20933e37f758a3114bf71ec3e7cfd4 Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Fix case of setupapi.h for mingw-w64Marius Kittler2020-03-031-1/+1
| | | | | | | | | | Change-Id: I9ddb290a10a620334abaf0500dd7b280e86b3a03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Support characteristic Write Without Response on BlueZ 5.50+Alex Blasche2020-03-031-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | BlueZ 5.50 adds support for this feature. This patch was provided by David Lechner via QTBUG-81696. Fixes: QTBUG-81696 Change-Id: I2a73b173821e36534b3848f7d0e35df16f118011 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-291-0/+2
|\| | | | | | | Change-Id: I5fe705f8a5f375ae44169a465515bb2c54cf6393
| * Android: Ensure that LE errors are forwarded from JNI to QtAlex Blasche2020-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to detect the error existed on the Java/JNI side. The code to handle and report the error was available on the Qt side. Unfortunately the essential signal and slot connection was never made though. This lead to [ChangeLog][QtBluetooth][Android] Fixed the missing QLowEnergyService::error() signal emission if the error was detected on the Java side. This probably cut 50% of all errors out. Change-Id: I6ee4d7605a1d1e61b920da56d7f67373fb7f5be5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-271-2/+2
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I2de4dcdb43a3ac6640f07fba463462e58fa16000 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Update plugins.qmltypes for 5.15Jani Heikkinen2020-02-252-2/+2
| | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: Ib0520ec5348f4bc2875f12514e56322a114c8018 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-224-10/+63
|\| | | | | | | Change-Id: Iea61654bd94c9bb4be0736a5d5512fb42d845488
| * Suppress deployment-settings files on AndroidAlex Blasche2020-02-211-1/+1
| | | | | | | | | | | | | | | | | | Apparently the file name convention has slightly changed. Change-Id: Iab220cc2350ee3a43c11a03ea76b1e2f33e53674 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Grant ACCESS_FINE_LOCATION to QtBluetoothAlex Blasche2020-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since Android 10(SDK v29+) all types of Bluetooth device discovery require ACCESS_FINE_LOCATION. This is highlighted by https://developer.android.com/about/versions/10/privacy/changes#location-telephony-bluetooth-wifi Fixes: QTBUG-81875 Change-Id: Icaecca1f72a994dc774dc2b90194da15cc0787b0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Ensure that a failing classic discovery doesn't prevent LE scanAlex Blasche2020-02-211-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the classic scan does not start properly we immediately error out. If the user has requested LE discovery in addition to the classic discovery, we should continue with LE discovery. By convention, we only bother the user with an error signal if none of the two methods succeed. Task-number: QTBUG-81875 Change-Id: Id867892210fbef6da0e4937c2aef20f726ba9a2a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Add location-turned-on check before starting device discoveryAlex Blasche2020-02-211-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The location permission and a running location service have been a prerequisite for a successful LE scan since Android v23. While the permission has always been checked before doing a bluetooth scan, the state of the location service was not checked. LE discovery without location turned on does not error out. It just reports zero discoveries. Starting with Android SDK v29, a classic Bluetooth discovery requires a running Location service too. Due to BluetoothAdapater.startDiscovery() returning an error code when location is turned off, it was time to check the location service before triggering the discovery to simplify the error handling for the API user. This patch ensures that location is turned on before any type of device discovery is started and the API reports an error reflecting this problem. Task-number: QTBUG-81875 Change-Id: Id51fd502ae24cbadbc704451fdf49d999224c16f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Catch turned off Bluetooth adapter when stopping LE discoveryAlex Blasche2020-02-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | Calling stopLeScan() causes a runtime exception. The patch prevents a crash due to the exception and progresses as if nothing has happened. An action that turned off the internal Bluetooth device has stopped a runnung discovery anyway. Fixes: QTBUG-67482 Change-Id: Iff377884c50cafa1f74dafe73e0acbb31b13e9bb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-154-15/+48
|\| | | | | | | Change-Id: I3d82c91d19f6caf5d5acad492b3531b098d1d256
| * "Fix" heartrate-server on AndroidOliver Wolff2020-02-112-0/+9
| | | | | | | | | | | | | | | | | | | | This is a workaround for QTBUG-80533. Command line applications are no longer supported on Android. As we use the heartrate examples as test cases for bluetooth, we work around this problem by instanciating a gui application which fixes the compile error on Android. Change-Id: If06767eb6ff534077f193163991d9d506c17e50e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Avoid possible hang in QBluetoothServer::hasPendingConnectionsOliver Wolff2020-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We have to unlock the mutex locker after the pending connection is handled in QBluetoothServerPrivate::handleClientConnection. Otherwise the application will hang, if the slot that is connected to QBluetoothServer::newConnection calls QBluetoothServer::hasPendingConnections as this functions also tries to lock the mutex. Fixes: QTBUG-81827 Change-Id: I40632d0c1e4a6cf4436f6471e5a0933c53dda9f1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: set proper state on service detail discovery failOliver Wolff2020-02-061-15/+38
| | | | | | | | | | | | | | | | | | | | | | If the service detail discovery fails, we do not only have to set a proper error but the service state also has to be set accordingly. Task-number: QTBUG-80770 Change-Id: I6abc28875c998b60efcfc513542765a52e19df90 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-alpha1Qt Forward Merge Bot2020-02-050-0/+0
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I947e4657fb07b0ada7007b69e265c56de1f0185d
| * Bump versionAlexandru Croitor2020-02-021-1/+1
| | | | | | | | Change-Id: I6761dfc3892c530212681243b41779d412435ca5