summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.5.1' in qt/qtconnectivityv6.5.16.5.1Qt Submodule Update Bot2023-05-161-2/+2
| | | | | Change-Id: I931883f1126d3261113a51f04b0d557fa98e3d3f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.1' in qt/qtconnectivityQt Submodule Update Bot2023-05-141-2/+2
| | | | | Change-Id: Ia8788dad9fbaaeebe6f6dee7785bfac34ace2014 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.1' in qt/qtconnectivityQt Submodule Update Bot2023-05-111-2/+2
| | | | | Change-Id: I01e644334bde72c09a3a3d169ed66585e0c8114d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.1' in qt/qtconnectivityQt Submodule Update Bot2023-05-051-2/+2
| | | | | Change-Id: I3287e1fa4382f6f750bda0907081a81c8f8924b8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-05-011-2/+2
| | | | | Change-Id: Ia869bdfa0e8aef94fd90f36f0aeb6b46fe9de852 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-281-2/+2
| | | | | Change-Id: I1bb4e62604f0fa368dbbc62c007bad37fa775cd5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-261-2/+2
| | | | | Change-Id: I09f17279789e140c4b617cccbbab0422b72dec7a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android-example: add missing properties in AndroidManifest.xmlBartlomiej Moskal2023-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After changing android target SDK version to 31, some missing values has to be defined in AndroidManifest.xml. AndroidManifest.xml template was updated in qtbase in: 56dee3de5e4ac1c4d37a2c5e27361e7ddbdea1a7 commit. In case when example uses its own AndroidManifest.xml file, it need to be updated separately. * android:exported="true": because the manifest sets an intent-filter, and it then has to explicitly to avoid the warning [1]. * android:allowBackup="true": this has to be explicitly set, we set it to the default value here [2]. * android:fullBackupOnly="false": SDK 23+ use this to deteremine to user auto backup or not, we set it to the default value here [3]. [1] https://developer.android.com/guide/topics/manifest/activity- element#exported [2] https://developer.android.com/guide/topics/manifest/application- element#allowbackup [3] https://developer.android.com/guide/topics/manifest/application- element#fullBackupOnly Fixes: QTBUG-112843 Change-Id: I79bb201fe74b7e3f321ec6654a133611f01af8da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 83e139db357fc2c7c642b394cfc2993fcf59d22c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove Unnecessary Q_DECLARE_METATYPE(QJniObject)Amir Masoud Abdol2023-04-242-6/+0
| | | | | | | | | | | | This doesn't seem to be necessary anymore. Maybe it was at some point, Removing them, even without moving it to qtbase doesn't cause any problems either. Task-number: QTBUG-109394 Change-Id: Id9a62f23aba355e2e37f70a374aa20c48ce4ef83 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 2b022c35a465af1e3fd4cb1cbdb06eaef8cdaf56) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-201-2/+2
| | | | | Change-Id: Ib18fe90e219d53665cf4d25c6b962a9eeca7b399 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-191-2/+2
| | | | | Change-Id: Ide947b5cc80c33af0eed64987e4f174f48db9e8f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-171-2/+2
| | | | | Change-Id: Ia33820234488999b05916ac96a921023fb41718f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-131-2/+2
| | | | | Change-Id: I25bf148ebc64efe030cecdce9321fd446695dbb1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-121-2/+2
| | | | | Change-Id: I75b264c9627a859ce12b12ed609eec1ed34beff1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-115-5/+5
| | | | | | | | | | | | | | | | | The '\meta category' command was used for tagging examples with a specific category, used in Qt Creators Welcome mode. As we want to also generate lists of examples belonging to a category elsewhere in the documentation, replace the command with a macro that expands to the original \meta command and also adds the example to a group using the \ingroup command. This way, the category names can be used as arguments to the \generatelist or \annotatedlist commands. Task-number: QTBUG-112731 Change-Id: I1df2d3bd6f2ef904ac7bac4d606b93d3824a802a Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 6d00c732c46b295402c5cbc05c3b73cb4cd833b5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* BtChat: fix a potential crash when deleting uninitialized pointerIvan Solovev2023-04-052-2/+1
| | | | | | | | | | | Initialize ChatServer pointer to nullptr, and also remove an explicit delete call, because the pointer will be managed by Qt. Change-Id: If1650a927e094a0b5349ecb6a8288531479ae1a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 7be77bb98e4e272de1fd6d6d8e70058ff52363e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-04-031-2/+2
| | | | | Change-Id: Ife8a7fd16247c6b4d0998002ebfe7749fb8d4750 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Bump version to 6.5.1Jani Heikkinen2023-04-041-1/+1
| | | | | Change-Id: If0c5fcfddc264a72955e09e4d69da4acde88cda1 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Exclude source files from unity buildAmir Masoud Abdol2023-04-031-0/+4
| | | | | | | | | | | | When building with Unity, Windows Bluetooth symbols from WIN32/COM and more modern WinRT APIs, e.g., AsyncStatus, start to confuse the compiler as related source files start to be pooled together. Task-number: QTBUG-109394 Change-Id: I3d59f09caca3e56b6961fb6ffcdf8233369313d2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 5894037fd5897d60103f3a6a9d27784f3747f437) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix .plist when building an example for iOS with CMakeJuha Vuolle2023-03-3011-137/+90
| | | | | | | | | | | | | | | | | | | | | When building an example for iOS with qmake (qt-cmake -GXcode) the local Info.plists of three of the examples don't work, because they were using qmake substitutions (${EXECUTABLE_NAME} instead of ${MACOSX_BUNDLE_EXECUTABLE_NAME}), which resulted in "CFBundleExecutable is not specified". Instead use shared plist files, each for CMake and qmake. One of the removed files contained NSBluetoothPeripheralUsageDescription key, which I think can be discarded now; it is intended for iOS < 13, and the minimum for Qt 6 is 13. Change-Id: I901dc176c001e25ce88d42b9456b6e16d8f43c20 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 0d1db5eabc9df56c92b1ef836060bf5232524e9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* HeartRate Game example: do not show duplicated devicesIvan Solovev2023-03-293-3/+17
| | | | | | | | | | | | | The deviceDiscovered() signal can be emitted more than once for the same device, so implement a check before adding a device. This commit amends a1f43b9dcd722527d52ceb0c7a138bd2994c1a7b Task-number: QTBUG-111972 Change-Id: Iff0a2b301d6d05090745ef97cedf5fab4532da7e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit d59db8d3e781e75481480507d36c08568ff4213a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* LowEnergyScanner example: allow stopping device discoveryIvan Solovev2023-03-294-27/+53
| | | | | | | | | | | | | | ... and also show the newly-discovered devices as soon as they are discovered. This requires a more complex logic for updating the device list, because the deviceDiscovered() signal can be emitted multiple times for the same device. Task-number: QTBUG-111972 Change-Id: I8e5f839ffb679516819d8f6063393d5a9b0ec840 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 6403ead91ee0f4060deefd5a35b2a5cf563d3258) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* HeartRate Game: QML revampIvan Solovev2023-03-2926-361/+383
| | | | | | | | | | | | | | | | | This patch implements proper QML module registration for both CMake and qmake. It also tries to address all qmllint warnings, which results in a major refactoring, because the current approach with Loaders provides a lot of unqualified access warnings. The new approach uses StackLayout to switch between different pages. Task-number: QTBUG-111972 Change-Id: Icc0122deebe63af16dd53c47690f2dc9fb88c919 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 007bf2bcf10007b02dd5fe09c0fc4be24229af14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* HeartRate Game example: general clean-upIvan Solovev2023-03-2912-64/+81
| | | | | | | | | | | | | | | | | | | | | | | | C++ code cleanup: * Fix include headers * Minor code-style improvements * Silence the warning about an uncreatable type by explicitly using QML_UNCREATABLE. We do not create the type in QML anyway. * Do not limit Windows platform to simulator mode. The example works perfectly on Windows. Build-system improvements: * Use qt_standard_project_setup() and PRIVATE linking in CMake Docs: * Add Connectivity category * Link to the documentation page which gives a full example overview Task-number: QTBUG-111972 Fixes: QTBUG-112194 Change-Id: I6e50d1a3e9219afbf010d6471e8f7eb802c2ef00 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit a1f43b9dcd722527d52ceb0c7a138bd2994c1a7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* HeartRate Server: revamp the exampleIvan Solovev2023-03-295-39/+55
| | | | | | | | | | | | | | | | | Some code clean-ups: * Use qt_standard_project_setup() and PRIVATE linking in CMake * Port away from QScopedPointer and use std::unique_ptr instead Documentation updates: * Add Connectivity category * Mention the new BlueZ D-Bus backend in the documentation * Small wording improvements * Provide more links to Qt classes and enums Task-number: QTBUG-111972 Change-Id: Id2a0ef48d3ce82f1784dd4b51f94236731730432 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 6f155ca7df89c649e178dac57f69574290cb516b)
* LowEnergyScanner example: refactor QML codeIvan Solovev2023-03-2917-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-2910-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)
* Windows: optimize BTLE device discoveryIvan Solovev2023-03-281-19/+22
| | | | | | | | | | | | | | | | | | | | | | Previously we were doing full service discovery every time when the BluetoothLEAdvertisementWatcher reports a new advertisement. This results in a very high CPU usage during BTLE device discovery on some configurations. In practice such approach might not be needed, because most BTLE devices repeatedly advertise the same data. With this patch we do a detailed service discovery only when a new device is added, or when the list of advertised services has changed. Note that we still need to handle all the incoming advertisements, because we want to report changes in other parameters, such as RSSI. Fixes: QTBUG-111116 Change-Id: I0863739a2fb21d04e9a728adc68e3f197f1966e3 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 4eac30923466e31d16288949979973d1db4e035f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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' in qt/qtconnectivityQt Submodule Update Bot2023-03-241-2/+2
| | | | | Change-Id: Iec29d89b90399c5dac80a8e782c4c0c6f4d3ec77 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove PingPong exampleIvan Solovev2023-03-2217-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-222-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-2217-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' in qt/qtconnectivityQt Submodule Update Bot2023-03-221-2/+2
| | | | | Change-Id: I755e12f31ef2e9696e7f507e70b31212966f71ea 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>
* Update dependencies on '6.5' in qt/qtconnectivityQt Submodule Update Bot2023-03-171-2/+2
| | | | | Change-Id: I085a541ef9ffc47e3e5c5ec4c0af059cde69301b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Revamp annotatedurl exampleIvan Solovev2023-03-157-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' in qt/qtconnectivityQt Submodule Update Bot2023-03-111-2/+2
| | | | | Change-Id: I70e916f5546eca26fac217710fc6fa4458054799 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-081-2/+2
| | | | | Change-Id: I6fdb0be2515769818adb876c1be6631d449df961 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-031-2/+2
| | | | | Change-Id: Ia3843ae2e5339b86feacbc2b4373c02bc65b7df8 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-021-2/+2
| | | | | Change-Id: I80e1139e8e4108989674edd7d099378718129bb4 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>