summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SDP scanner: encode input URLs and escape XML-specific characters6.4Ivan 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.4' in qt/qtconnectivityQt Submodule Update Bot2023-02-211-2/+2
| | | | | Change-Id: I763210288682c4d40792d35c4bfefb41bf97f653 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.4' in qt/qtconnectivityQt Submodule Update Bot2023-02-131-2/+2
| | | | | Change-Id: I94cd37852d3ca14ac772ddbecacb2bd5c3b35895 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-02-101-2/+2
| | | | | Change-Id: Ibd51ade4f600d21509b45c3330da4fdb2a3c7378 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* iOS NFC: Always ensure timeout after session invalidationJulian Greilich2023-02-092-15/+34
| | | | | | | | | | | | | | | 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)
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-02-021-2/+2
| | | | | Change-Id: Ia40e764815c7a7c13de2f2098d97771b3456bff0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-311-2/+2
| | | | | Change-Id: I5933e5cf8d4d556fa526bab1357629d6db785c72 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-251-2/+2
| | | | | Change-Id: Id838539059d0e83748b265090c4c1c407b4cb06c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-241-2/+2
| | | | | Change-Id: If5b8a75e7b3972af5d4dab1ae25a3958aacea558 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_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.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-231-2/+2
| | | | | Change-Id: Iaadcd6b0577a9096f23ebe4ba72b5f033d54ad6a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-201-2/+2
| | | | | Change-Id: I6a3b9fa6c214878a1a8535868e7f2446a9e15115 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-181-2/+2
| | | | | Change-Id: I2003982b7054b0c9480357a8cb1b07254a4ab626 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_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>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-171-2/+2
| | | | | Change-Id: I6d3fccc0de505bdfa954f5fa2a2ec18a245750f9 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-161-2/+2
| | | | | Change-Id: I1f30490e14722a2bd197ec6dae9f28d3977a8a96 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-131-2/+2
| | | | | Change-Id: I7f53bbd6bf47003302c5c0a384c27a278883d035 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.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-091-2/+2
| | | | | Change-Id: I88bb50f1f9c1e1abb3c6ac385ff7e6759712f8ab Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix the naming of the BlueZ packageAlexey Edelev2023-01-042-3/+5
| | | | | | | | | | Adjust variable names to be case-sensitive. Fixes: QTBUG-109315 Change-Id: I7d534fbfd7891740fbc8ac172b24a2b03832388b Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 0b941a358063c58fe1eaaf3ed9884d70ce3992cb)
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-041-2/+2
| | | | | Change-Id: I7f05ed051e62953044f7dcdba03eb995e2b589b8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Bump version to 6.4.3Jani Heikkinen2023-01-021-1/+1
| | | | | Change-Id: Icd60060a71c54292a14a82c2de0fba7215fd1bc5 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2023-01-021-2/+2
| | | | | Change-Id: Ib5b7373929c3111f43bdde918b2343f6479f334f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-12-291-2/+2
| | | | | Change-Id: I30fab0d35661b23b11cbf5879f6b9cd14144a9eb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-12-201-2/+2
| | | | | Change-Id: Ic2338d20868efbeeadeca40ae1a8209515563fa6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-12-061-2/+2
| | | | | Change-Id: I7c2c4cc7d06f00baecf7f3e313c3d1ef0b9e891d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-12-011-2/+2
| | | | | Change-Id: I70537ab19722092b85d4e435392b7ab1d88baea4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-291-1/+1
| | | | | Change-Id: I6dc0748a3f8538c8e5658696372b5a48c228550e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-231-1/+1
| | | | | Change-Id: I022320c62cce8373fe716feafe976c87c21f1015 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-211-2/+2
| | | | | Change-Id: I1d20fa8147c3c4cd0b5d2616f1e3d1bb5ddb7d07 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-181-2/+2
| | | | | Change-Id: Idba2a7cd27759e40e916451d7826db8836c0b465 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-141-2/+2
| | | | | Change-Id: I212d64a54719062a3d7848984416818345db41c4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-11-1224-49/+49
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. This is a 6.4 re-run of the script we ran in dev, in order to avoid conflicts between the branches when cherry-picking. Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-1213-116/+116
| | | | | | | | | This is a the same semantic patch (qt-port-to-std-compatible-api V5 with config Scope: 'Container') as in dev. I've re-ran it in 6.4 to avoid cherry-pick conflicts. Change-Id: I9621dee5ed328b47e78919a34c307105e4311903 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bump version to 6.4.2Jani Heikkinen2022-11-111-1/+1
| | | | | Change-Id: I4625b349dcd1e62658af79aa3ce01d691c71eef5 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-111-2/+2
| | | | | Change-Id: I9c52e44ad88cb3b832dc315152024e319e75a93f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-11-041-2/+2
| | | | | Change-Id: Id361b87e20918069a6e51abf863e28039e10c717 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-311-2/+2
| | | | | Change-Id: I3185a268e4d4cc06f008a4d3863912c8abee2d3c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-271-2/+2
| | | | | Change-Id: Ia7fb4ed2dc755a5e5be15437e0f3e0017ad8cf6f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-261-2/+2
| | | | | Change-Id: Ib33a855736f6564f452b3998857307ad0f387641 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-201-2/+2
| | | | | Change-Id: I68d334bb412c116cdcd70da92a90233926f4958b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-191-2/+2
| | | | | Change-Id: I44b5a64a83b2cecc552362c5378fff9ffec561fa Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Fix BlueZ license to GPL-2.0-onlyKai Köhne2022-10-181-1/+1
| | | | | | | | | | GPL-2.0 is deprecated in SPDX. This also fixes an issue with qtattributionsscanner in latest qttools. Change-Id: I462b6c23ffaf1cbafcfd7feadc12f99ddbe797e5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 50d23da4c6d1f0672dcbb3e8f39a6f89d5e5df6f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-181-2/+2
| | | | | Change-Id: I2464e6a52a83de8d2a064bcb402c07aa0dbf2915 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtconnectivityQt Submodule Update Bot2022-10-171-2/+2
| | | | | Change-Id: Ic1b5ee8040eeb45c4033a31c6c9cd713917939fa Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove unused and redundant table row in documentationJuha Vuolle2022-10-141-7/+0
| | | | | | | | | | | The row has been empty since its introduction and even if used, wouldn't provide very useful information (other rows imply the support) Fixes: QTBUG-107196 Change-Id: I3e3ca4e6c446707772a24fc6b3ea000e4b889fdf Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit bd42055de98e93b3323fb13a985ce94685415e97) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace GATT specification link with accessible one in documentationJuha Vuolle2022-10-141-1/+1
| | | | | | | | Fixes: QTBUG-107192 Change-Id: Ie2a94c01aed3f47bb40b3b875b1bb1ed13401969 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 1a43ef32d3c1aa57532b644ad285a731ed03f68a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>