summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.5.0' in qt/qtconnectivityv6.5.06.5.0Qt Submodule Update Bot2023-03-281-1/+1
| | | | | Change-Id: I160489e8b846d47fb0402ef1306fbb90713dfb39 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* LowEnergyScanner example: refactor QML codeIvan Solovev2023-03-2817-156/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | Adapt the QML code to modern guidelines: * properly create a QML module in CMake and qmake * use versionless imports * convert the Device class to QML_SINGLETON instead of injecting it into the root context * use QQmlApplicationEngine::loadFromModule() to start the app The last change actually requires that we use Window instead of a Rectangle for the Main.qml page. This, in turn, breaks the pre-existing Loader logic, because every time we load the Main.qml page, a new window is created. Apart from that, we get unqualified access warnings from qmllint, because loader is accessed from every QML element, while it is only defined in the Main.qml. To fix that, we introduce a new page for device scan, and convert Main.qml to use StackLayout instead of a Loader to avoid unqualified access warnings. While on it, also fix other qmllint warnings and re-format the QML files. Task-number: QTBUG-111972 Change-Id: Ia83cda08bf9547f5c2e335cb090c15d776f1b6ad Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit ca681cd1b3a51d10106a1287a98c5590100feb6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* LowEnergyScanner example: general clean-upIvan Solovev2023-03-2810-82/+101
| | | | | | | | | | | | | | | | This patch introduces non-QML clean-ups to the example: * add Connectivity category to the docs * fix includes * consistently use Qt::StringLiterals * split some too long lines QML part requires a huge refactoring, which is done in a follow-up commit. Task-number: QTBUG-111972 Change-Id: I053b1c564d9dc2e05dfdb8879821615391e4be35 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit b72c83bfecc5d259ef0fcf20cb05d2464a7fd0ab)
* CMake: Fix btscanner manual test to work on macOSJuha Vuolle2023-03-271-30/+26
| | | | | | | | | | | | | | | | Because it's a manual test now instead of an example, use qt_internal_add_manual_test. Remove the code bits that were needed for examples. Enable uic. Manually link to the darwin permission plugin because that's not done automatically for tests yet when targeting macOS. Task-number: QTBUG-104754 Task-number: QTBUG-112212 Change-Id: Id4176f60118a4d3dcca96df56d53f9243a50174d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit efc852b0ea327831fcceaa925be8e6721ce93297) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-251-2/+2
| | | | | Change-Id: Ia9445934bf05d89029cb30e16fd965860dde79d4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-251-2/+2
| | | | | Change-Id: Iaac7f4f105f9e6f405354071db48452405e7c600 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove PingPong exampleIvan Solovev2023-03-2317-980/+1
| | | | | | | | | | | | | The example contains a lot of rather complicated code, which is not directly related to the demonstrated Bluetooth features. Remove it in favor of BtChat example, which demonstrates the same Bluetooth features in a much more compact and understandable way. Task-number: QTBUG-111972 Change-Id: Iccb2598fa6e88816697286b2252858f35a635ee5 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit df289a72abe1fc46b5b029b2a6e27f80a198dc9f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* BtChat example: document service lookupIvan Solovev2023-03-232-1/+34
| | | | | | | | | | | | | Extend the documentation for BtChat example with a section describing remote service discovery. This allows to completely remove the PingPong example, because it does not show any new APIs compared to the BtChat example. Task-number: QTBUG-111972 Change-Id: I9328205b21fe750562c3510815aaa6c8d47640b1 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 63c2b7b2d62a97895be00a6c5b718e6d319d6b5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* BtScanner example: move to manual testsIvan Solovev2023-03-2317-79/+61
| | | | | | | | | | | | | | | | | | | | | | | The example mostly shows the usage of QBluetooth{Device,Service}DiscoveryAgent classes, which is also illustrated by other examples. Move it, because it's not fully functional on mobile platforms (because it's widget based). Do not remove it completely, because it might still be useful for doing Classic device scan. Also implement some improvements while on it: * fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE linking * fix memory leak in DeviceDiscoveryDialog * rework the code to use Qt parent-child model instead of manually deleting objects where possible * fix includes * fix forward declarations Task-number: QTBUG-111972 Change-Id: Ie4bc9e25ccdda6d5f5de2f57528df349c71cdc12 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 6168203d7c0e8e4df1908a62338b8abdd57855eb)
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-221-2/+2
| | | | | Change-Id: I9fe79e9178284dbf8723e105bd7df5492f8feaac Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* BtChat example: revamp documentationIvan Solovev2023-03-201-52/+67
| | | | | | | | | | | | | | | | | * Remove 'Example' from the name * Add 'Connectivity' category * Consistently use \c for class and method names * Add some link to QBluetoothSocket's methods * Fix some typos As a drive-by: wrap lines at 80 characters in places where other changes were made to the docs. Task-number: QTBUG-111972 Change-Id: Idbe34bde04510f7319d58e33ce52fd8324ddf868 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 7d20a4fb6a520b13666c8808ae74fb9a43b6532c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* BtChat example: improve codeIvan Solovev2023-03-2010-47/+54
| | | | | | | | | | | | | | | | | | Improve the example code according to guidelines: * fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE linking * fix memory leak in Chat dialog * fix includes * fix forward declarations and do not use QT_USE_NAMESPACE * use Qt::StringLiterals * remove outdated warning for Windows platform * split too long lines Task-number: QTBUG-111972 Change-Id: I81e472cfacf8c6adf97b31e97254797d40b01519 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 30bb6406024831d8f79a0718da170eff7b41ff79) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revamp annotatedurl exampleIvan Solovev2023-03-167-29/+32
| | | | | | | | | | | | | | | | The example was already updated not so long ago, so this patch mostly introduces cosmetical changes: * Fix CMakeLists.txt to use PRIVATE linking and also use qt_standard_project_setup() * Fix includes according to code guidelines * Do not use 'Example' in the example name * Add proper category Fixes: QTBUG-111906 Change-Id: I09dc19699858f24d3d83ff9e71e8233a036f710c Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> (cherry picked from commit 7f1c6e44c8b18876ab978d2311866b3ddeed7267) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityv6.5.0-rc1Qt Submodule Update Bot2023-03-141-2/+2
| | | | | Change-Id: I7dddd85b078456e7689a57e700405cb7fbc28f32 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-131-2/+2
| | | | | Change-Id: I6137f6d3a06bc888af040368bb7c510e5ab94cfb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-111-2/+2
| | | | | Change-Id: I826412413dfbe2114eeae3c00a6882aa5fc42ff5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-081-2/+2
| | | | | Change-Id: I495a169c97da914eb9dc4d3986c7a4f8d522b0c0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtconnectivityQt Submodule Update Bot2023-03-031-2/+2
| | | | | Change-Id: I46a90027d7be60d1e440d647b71dee06995aea7e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-03-011-2/+2
| | | | | Change-Id: I2b9719bff7af3bff1340eb8f2be49a085deec1b3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* SDP scanner: encode input URLs and escape XML-specific charactersIvan Solovev2023-02-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation didn't take care of escaping the XML-specific characters and didn't handle non-printable characters. This patch makes use of QUrl class to properly %-encode the input data. The QUrl::toEncoded() method %-encodes all XML-specific characters except '&', so we need to manually replace it with "&amp;" before adding the url to the generated XML. Escaping special XML characters potentially allows Qt Bluetooth to handle more URLs received from sdpscanner, because QXmlStreamReader discards attributes with unescaped special characters, so previously part of the URLs could be silently skipped. For other potential sdpscanner users this change shouldn't make much difference, because they should anyway parse the returned XML documents according to XML standard. %-encoding of URLs potentially changes the way the URL looks for the user, but not for the software that should handle the URLs, so this change is also safe. [ChangeLog][Qt Bluetooth][sdpscanner] sdpscanner now %-encodes the URLs and escapes all XML-specific characters in them before adding the result to the generated XML output. Fixes: QTBUG-111369 Change-Id: I6de080fef7689ef96fe5e5e26c62a3c48ebc45b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d195ae3a07dcd3fceeb70554ed9493f55ef50c86) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-02-231-2/+2
| | | | | Change-Id: Iffd7498d22c9696251e4afe097c58406c903e0b4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* sdpscanner: fix potential unwanted truncation for SDP_TEXT_STR{8,16,32}Ivan Solovev2023-02-181-1/+3
| | | | | | | | | | | | | | | | QByteArray::resize() treats all negative parameters as a request for a zero length. So the code text.resize(text.indexOf('\0')); can completely erase the text if there is no '\0' in it. Fix it by explicitly checking the return value of QByteArray::indexOf(). Change-Id: Idc42bf4b96a9be5b007916263d6cf1e831b96c07 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 58cb7eeea5c05e42efc806716eb5eb39bd25787b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* sdpscanner: fix URL processingIvan Solovev2023-02-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not use the fixed-size temporary buffer, instead just parse the data as a QByteArray. Grepping through BlueZ sources, I could find only several usages of SDP_URL_STR{8,16,32}, and all of them suggest that the url is simply a NULL-terminated string (see [0], [1], [2]). However, the older BlueZ sources suggest that the url can be not NULL-terminated as well (see [3]). To be on a safe side, we provide an implementation that handles both cases correctly. [0]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/lib/sdp.c#L465 [1]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/src/sdp-xml.c#L351 [2]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/tools/sdptool.c#L517 [3]: https://android.googlesource.com/platform/external/bluetooth/bluez/+/master/src/sdp-xml.c#324 Fixes: QTBUG-111242 Change-Id: I22f9521582863fb316dd0b2c49a78928b80a6078 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit a811bcb3e76e98d480581634b84daf5c8948aceb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityv6.5.0-beta3Qt Submodule Update Bot2023-02-171-2/+2
| | | | | Change-Id: I643f875a4e1b006a4a6c55107511bec2594ce9cd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix qt_attribution.json for the NDEF Editor exampleTopi Reinio2023-02-111-2/+2
| | | | | | | | | | | | | qtattributionsscanner does not accept wildcards in the 'Files' field - list directories instead. Fix the documentation module name to 'qtnfc'. Change-Id: Id8f92f429c5608089c2c8505100b7030debcf780 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> (cherry picked from commit fbfc061e28334951d10f24ec1223d0530151899b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the broken test after the retirement of qt_parse_all_argumentsAmir Masoud Abdol2023-02-103-3/+3
| | | | | | | | | | | | As we are now processing the arguments with cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape characters anymore. Task-number: QTBUG-99238 Change-Id: I08f96a44c99a77ff11892bb0eb78c04549aca2ef Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 38d630bd19fef20daae18ef71ecf81fd7655e0e5) Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-02-101-2/+2
| | | | | Change-Id: I14f9b690b62d9b2c04138a28e018e62d3d2fa880 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QtNfc: Rewrite NDEF Editor example using Qt Quick ComponentsIevgenii Meshcheriakov2023-02-0861-1491/+1090
| | | | | | | | | | | | | | | | This makes the example look more native on mobile platforms. Leave only the functionality related to reading and writing of text and URI NDEF records to simplify the code. Removed functionality includes saving/reading messages to files, and support for image NDEF records. Fixes: QTBUG-103949 Change-Id: Ie14e3009e2d0238b266eb9690795ca6b56c0010c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 115b4d947adf90a706f76de831f34960e3c62a9c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Catch broadcast receiver unregistration exception on AndroidJuha Vuolle2023-02-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Reproducing the issue reliably has proven to be near impossible, but the stack trace can be seen every now and then, and it does not seem to cause any functional harm. The strong suspicion on what happens is that in some places of the code we create a temporary QBluetoothLocalDevice object to check for example address(). This happens for example when creating a QLowEnergyController object, which is one of the scenarios I recall seeing the unhandled exception. The localdevice creation triggers broadcast receiver registration, and the ~immediate destruction triggers unregistration. Reading the address() works as it does not rely on any broadcast events. It seems plausible that in some cases the registration is not yet fully complete on Android side when the unregistration is ~immediately called. Fixes: QTBUG-106938 Change-Id: Iac734f17fb9d2a1879fca39d9b2839cb530e5df5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 29e73453ed653782fd885e79974de76bd60fc734) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace deprecated BT LE methods on Android API 33: descriptorsJuha Vuolle2023-02-046-16/+77
| | | | | | | | | | | | The overarching theme for these API deprecations is to improve memory safety. This patch replaces the descriptor related APIs. Fixes: QTBUG-107180 Change-Id: Ief098d67d2601e06a2f29fa38d9b481bbda605f9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 8ae30c552ce7ae1e0ee4c6a472666a1e8ee2790a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace deprecated BT LE methods on Android API 33: characteristicsJuha Vuolle2023-02-044-27/+98
| | | | | | | | | | | | | | | | | | | | | | | | The overarching theme for these API deprecations is to improve memory safety. This patch replaces the characteristic related APIs. The list of deprecated APIs, addressed by this and the followup commit: * BluetoothGatt::writeCharacteristic() * BluetoothGatt::writeDescriptor() * BluetoothGattCharacteristic::getValue(), no replacement * BluetoothGattCharacteristic::setValue(), no replacement * BluetoothGattDescriptor::getValue(), no replacement * BluetoothGattDescriptor::setValue(), no replacement * BluetoothGattCallback::onCharacteristicChanged() * BluetoothGattCallback::onCharacteristicRead() * BluetoothGattCallback::onDescriptorRead() * BluetoothGattServer::notifyCharacteristicChanged() Task-number: QTBUG-107180 Change-Id: I054db07301038ceb56b8af8471d71309d61ae777 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 712bdeb619fe350a96e05eccf54291407fd26316) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS NFC: Always ensure timeout after session invalidationJulian Greilich2023-02-032-41/+61
| | | | | | | | | | | | | | | | iOS needs some time after invalidating a session before a new session can be started. Otherwise the NFC dialog of iOS will not show up. For restarting a session inside the iOS NearfieldManager, this was already solved with a timeout of 2 seconds. This commit fixes the case, that a user of the Nearfieldmanager restarts a session manually too fast. Change-Id: Ic91ad225a9cab13ba92523f33a19f44af68575a0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 849ba86ba9a073a266219b6a39786e20f4f3ed7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove explicit Android SDK jar versionJuha Vuolle2023-02-022-6/+2
| | | | | | | | | | | The versions were too old to begin with (minimum is 23) and perhaps better use the default to begin with. Change-Id: Ie5c502001c4c4c59da091e7fbf899e4a5234034c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1abf525bb2b9c7122ad0bd183c022e92362ea077) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-02-021-2/+2
| | | | | Change-Id: Ifa665573727add0513a8568fededf622fe01b441 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-311-2/+2
| | | | | Change-Id: Iabbf04b89b2235cf23d72dd377005284f00ea93d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-271-2/+2
| | | | | Change-Id: I91a9c60683808df81d631a3dbae31dd209089018 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix CMake Unity (Jumbo) buildFriedemann Kleint2023-01-252-5/+6
| | | | | | | | | | Remove clashing string constants. Task-number: QTBUG-109394 Change-Id: I44c89cbc58fcc2e2ae33d23acd541eaba1a5a288 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit a68dd14499f557d1f334f19069498669eca90058) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Proper clearing of WinRT factory cache in QtBluetoothMarc Mutz2023-01-232-0/+2
| | | | | | | | | | | | | | | | Because we include <winrt/base.h>, use the factory-cache-cleaner registration developed in qtbase/ffb9dee1b0954e4d4f9e9791175609a80ecafc31 to make QtBluetooth contribute its part to fixing QTBUG-103611. Including the qfactorycacheregistration_p.h header from another header is explicitly supported (inline variable). Task-number: QTBUG-103611 Change-Id: I1f21a7001a3eea88ddc5ba647c72c3dd22c69374 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9d36ae3f8d00299ac483df983f244f3b1cc16d76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityv6.5.0-beta2Qt Submodule Update Bot2023-01-231-2/+2
| | | | | Change-Id: Ic48c862b9a9af2b128275d93a71c47b0bd08b085 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android LE Peripheral: properly update characteristic and descriptor local ↵Ivan Solovev2023-01-184-0/+207
| | | | | | | | | | | | | | | | | values Android backend did not update the serivice's characteristic and descriptor values after executing writeCharacteristic/writeDescriptor. As a result, the connected central saw the correct updated value, while local request still returned the old value. This patch fixes it by properly updating the local values when the write operations complete successfully. Change-Id: Ie09299b6c72bbf92ab6c824c3ca23f0136f0457e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit e5d1b776b1445eb6fde6ce33b54fd98e9fb49994) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't clear the remoteDevice address in resetController()Juha Vuolle2023-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | The Bluez DBus peripheral role support cleared the remoteDevice so that the QLowEnergyController::remoteAddress() will return empty after disconnection. However the resetController() is also called in client role connectToDeviceHelper(), and by reseting the remoteDevice address there, the controller won't find the remote device path and connect will fail. Instead clear the remoteDevice address in places specific to the peripheral role. Amends: e7499c2cca615eaff3bd4c9ffe5f72d7112055cf Change-Id: I53a0de157873e95b9e832f67a24d902277f233a1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit dcb4ef0d3b037a25620f8ecdbdb0d335cd466285) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLowEnergyController Windows: fix UI hangs during discovery on disconnected ↵Ivan Solovev2023-01-172-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paired devices Commit 0b60ca266f0fe27053a58eff3dbd903e3a1678ca introduced Close() calls for GattDeviceService objects. IIRC, it was done to avoid potential GattCommunicationStatus_AccessDenied errors, which could otherwise happen when trying to re-acquire the non-closed service. This commit does the proper cleanup when the device is disconnected. However there is one corner-case: when we try to connect to a paired device which is turned off, Windows provides its services (using some cached data), but the service details discovery fails. The details discovery is executed in a background thread using a set of async calls. If the user disconnects from the device during this discovery, the GattDeviceService::Close() call for the respective service will block until the async operation fails (which takes a couple of seconds on Windows 11). As a result, the UI thread freezes for this time. This patch is an attempt to avoid it by shifting the Close() call to the background helper thread in such cases. If there is an error during details discovery, or if it just takes too long, and the user decides to disconnect from the device, the service will be closed directly in the helper thread. However, if the details discovery is completed successfully, the GattDeviceService object can still be re-used for other operations, and it will not be deleted from cache until the device is disconnected. Fixes: QTBUG-108461 Change-Id: I8ebe945130808ed7bd8852a76bba84c73651f5a5 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 4c92565f04755eb011be4b893d2619e25fb008c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QWinRTLowEnergyServiceHandler: optimize behavior at disconnectIvan Solovev2023-01-171-8/+29
| | | | | | | | | | | | | | | | | | | | | | | The QWinRTLowEnergyServiceHandler helper class is used to query low energy service details. It works in a background thread and performs multiple async operations to get the results. As the class works in a background thread, we use QWinRTFunctions::await() to wait for the results of async operations. This allows to simplify the code. In practice the user might want to disconnect from the device while service details discovery is performed. Previously the background thread was still performing all the requests. This patch handles the already-existing QLowEnergyControllerPrivateWinRT::abortConnection() signal and provides the exit condition to all QWinRTFunctions::await() calls, so that the background thread does not do unnecessary work. Task-number: QTBUG-108461 Change-Id: I1db05c906beb0078de8a00fd5e32d589306f6665 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit c68e5d0952036204b8d20b26f0de362b36c03511) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Install android jars to INSTALL_DATADIRFab Stz2023-01-162-2/+6
| | | | | | | | | Task-number: QTBUG-106533 Change-Id: I5b09d882230ba6b996f5edc5ac4502d0bc004525 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 45c88ecee67e488ec1deee56d2b5227b39774f81) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-131-2/+2
| | | | | Change-Id: Ic038c19c570bacaf8eaf4b75da697616aeb6cab3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Purge mentioning of Technical Preview from the Bt LE overviewAlex Blasche2023-01-111-5/+3
| | | | | | | | | | | The various versions do not matter anymore as current Qt Version are long past the mentioned versions. Change-Id: I285785eb64a82cacdd853380312e4810ec907c1c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit c71ce5cde16d92a944741fdf9d4b7b7a926dc91a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-091-2/+2
| | | | | Change-Id: I5e7b18b0c88b2a7e4bf1238fcf993fa0881d0e08 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-041-2/+2
| | | | | Change-Id: I2286679c4dc286b5af4929bed6bb3ccefb34d2e7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove QT_USE_SYNCQT_CPPAlexey Edelev2023-01-021-2/+0
| | | | | | | | | Option has not effect anymore. Change-Id: Ia9b3610502720c830626e711a2de531f8a64a5d9 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit e473d523dd4d93df52bd255071cd515e2d6904fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-01-021-2/+2
| | | | | Change-Id: Ib1b55f1e1f2543afc088871805b504ccb8fc9837 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>