summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Examples: Use versioned CMake targets for Qt modulesKai Köhne2024-01-178-25/+25
| | | | | | | | | | Task-number: QTBUG-113277 Change-Id: I4885e6df894e24c2fdacccc4e58530ee9b190968 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 91c3e3dceaaaf27e7e92425e99f42898871fb6c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f87eb7401c50cf8fca61e49f06e1bfbb52964639)
* Doc: Tweak description of Qt NFC examplesKai Köhne2024-01-113-8/+10
| | | | | | | | Change-Id: I784aea736d77df873289141535dcbe20f7c0d131 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit aca4a5649b5459f2f507de73bee351d171744d3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ec88b0f5f452db7d100beb6fe33c16bb3e35ef4f)
* Doc: Tweak Qt Bluetooth example documentationKai Köhne2024-01-103-6/+10
| | | | | | | | | | | | Linkify Qt Bluetooth, and add tags. QtBluetooth will create a link to https://doc.qt.io/qt-6/qtbluetooth-module.html Change-Id: I9da8bda1591fae26fbe0bde7ac86371af4b9e71c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 619c20be1274778ff3a9344cd7f5b13f085bc956) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7d458f96c45474ee20ca3c2f7aaf91a07427aeee)
* NdefEditor: do not clear the existing message before readingIvan Solovev2024-01-062-1/+7
| | | | | | | | | | | | | | | | | | | | | The read operation can be cancelled, or might fail for some reason. In this case, the user does not expect the existing entries to be deleted, so do not clear the message before reading. If the read is successful, the existing message is replaced by the new one, so no action is required here. Update the example documentation to clarify this behavior. Amends 115b4d947adf90a706f76de831f34960e3c62a9c. Fixes: QTBUG-120410 Pick-to: 6.5 Change-Id: Ibaf00fb3c661abcc39b5d758e57ee5a837c0e270 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> (cherry picked from commit b55674cbabb6250a415eeba96671a937045e4fd3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ee3e3cfc26ce9d9af2b1b8dd6f960514a0b20b55)
* Update BTLE Heartrate Game example UIIvan Solovev2023-12-2132-177/+460
| | | | | | | | | | | | | | | | | | | | Improve the example according to the new design: * Apply new colors * Rework layouts to match the updated design * Use icons in the notification/error box * Apply new font sizes * Update screenshots in the docs, convert them to webp so that they do not take too much space. * Disable the Start button on the Measure tab if the device is not connected, or if the proper service is not discovered. * As a drive-by - fix the wording in the docs. Fixes: QTBUG-118905 Change-Id: I90669ea05c5c6b76eb711862c494f1180dbd8dd7 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 375e0e2c74adad9b609f5e48dffb88b07158bbfe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c3f69a2da4ee563f056eb0da52f0e8ae75a858db)
* Bluetooth Chat example: update UIIvan Solovev2023-11-2727-25/+160
| | | | | | | | | | | | | | | | | | | | | | | * Add some icons for Light and Dark themes. Implement switching between themes by listening to QStyleHints::colorSchemeChanged() signal and manually picking the proper icon. * Rework the desing to get rid of the unnecessary "Quit" button, and also change the layout of buttons in the connection dialog. * Update the screenshot in the documentation. As a drive-by fix, make sure that the cursor is always at the end of QTextEdit before showing a new message. The user can change the cursor position by clicking/selecting the text, and this could previously lead to some bugs in message visualization. Fixes: QTBUG-118875 Pick-to: 6.5 Change-Id: Ia3a9dec3dae0d1411643ed851eba0ab4dc96a47f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 6eb66322f0933de004baf35a96c5dd06d5d62ff6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Hide attributions for example icons from overviewKai Köhne2023-09-041-0/+3
| | | | | | | | | | | The code is only used in an example. Task-number: QTBUG-116580 Change-Id: I62786f01e2a368e7439c5fff3a83bff1ad2f0baa Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 8b1c26be6b984d92260d3599ec52de4c6c579dc6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add example categories for Qt NFC examplesMats Honkamaa2023-08-211-0/+1
| | | | | | | | Task-number: QTBUG-116273 Change-Id: I99dbca4f4f4f933daced7ca2ff5ae9f1eee9d304 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 29117ff85d373c1eedfa42c1f05078098a76baa0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* LowEnergyScanner example: migrate to QML Permission APIIvan Solovev2023-06-233-29/+46
| | | | | | | | | | | | | | | | | Update the example to use QML Permission API. This is not strictly necessary, because the example provides custom C++ wrappers around Qt Bluetooth classes, and the permission request was already conveniently implemented there. However, this example is a good candidate to show QML Permission API usage with Qt Bluetooth. That's the reason for the code update, as well as a documentation improvement. Fixes: QTBUG-114640 Change-Id: I3ffeb61a83c205724da8b462f930604e1adb26c0 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 92e095a4ff780145d91feae2be33184be4503b40) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove AUTO_RESOURCE_PREFIXAmir Masoud Abdol2023-05-311-1/+2
| | | | | | | | | | AUTO_RESOURCE_PREFIX is deprecated, and we should instead use `qt_standard_project-setup(REQUIRES` which leverages the Qt CMake policy mechanism, and requiring Qt 6.5. Pick-to: 6.5 Change-Id: I64a90456d927be9751ad167f4a647b5406f328a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtBluetooth: use public QPermission API to check for permissions on AndroidIvan Solovev2023-05-033-2/+6
| | | | | | | | | | | | | | Now when we have the fine-grained public QBluetoothPermission API, we can use it to check for permissions in the Android implementation. Adapt QtBluetooth examples to use only the minimal required set of permissions. As a drive-by: fix a couple of qCWarning() strings. Task-number: QTBUG-109964 Change-Id: I55c67bcae27926e76bf9c1a8a9367af2b58883ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* 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 Pick-to: 6.5 6.2 5.15 Change-Id: I79bb201fe74b7e3f321ec6654a133611f01af8da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* 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. Pick-to: 6.5 Task-number: QTBUG-112731 Change-Id: I1df2d3bd6f2ef904ac7bac4d606b93d3824a802a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* BtChat: adapt to using new QBluetoothPermissionIvan Solovev2023-04-054-6/+54
| | | | | | | | Also add missing Info.plist files Task-number: QTBUG-109964 Change-Id: Icf1fdf1353898538ce42a27cb0b0cb01c0823e26 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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. Pick-to: 6.5 Change-Id: If1650a927e094a0b5349ecb6a8288531479ae1a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* heartrate-game: use permission API to grant Bluetooth permissionTimur Pocheptsov2023-04-036-9/+77
| | | | | | Task-number: QTBUG-109964 Change-Id: Ic667c922f1d01d25a4eac8508481108d83f7a0af Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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. Pick-to: 6.5 Change-Id: I901dc176c001e25ce88d42b9456b6e16d8f43c20 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* HeartRate Game example: do not show duplicated devicesIvan Solovev2023-03-292-2/+13
| | | | | | | | | | | | 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 Pick-to: 6.5 Change-Id: Iff0a2b301d6d05090745ef97cedf5fab4532da7e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 Change-Id: I8e5f839ffb679516819d8f6063393d5a9b0ec840 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* HeartRate Game: QML revampIvan Solovev2023-03-2826-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 Pick-to: 6.5 6.5.0 Change-Id: Icc0122deebe63af16dd53c47690f2dc9fb88c919 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* HeartRate Game example: general clean-upIvan Solovev2023-03-2812-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 Pick-to: 6.5 6.5.0 Change-Id: I6e50d1a3e9219afbf010d6471e8f7eb802c2ef00 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* HeartRate Server: revamp the exampleIvan Solovev2023-03-284-29/+44
| | | | | | | | | | | | | | | | | 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 Pick-to: 6.5 6.5.0 Change-Id: Id2a0ef48d3ce82f1784dd4b51f94236731730432 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 6.5.0 Change-Id: Ia83cda08bf9547f5c2e335cb090c15d776f1b6ad Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* LowEnergyScanner example: general clean-upIvan Solovev2023-03-2810-84/+102
| | | | | | | | | | | | | | | | 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 Pick-to: 6.5 6.5.0 Change-Id: I053b1c564d9dc2e05dfdb8879821615391e4be35 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Remove PingPong exampleIvan Solovev2023-03-2215-976/+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 Pick-to: 6.5 6.5.0 Change-Id: Iccb2598fa6e88816697286b2252858f35a635ee5 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 6.5.0 Change-Id: I9328205b21fe750562c3510815aaa6c8d47640b1 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* BtScanner example: move to manual testsIvan Solovev2023-03-2114-687/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.5 6.5.0 Change-Id: Ie4bc9e25ccdda6d5f5de2f57528df349c71cdc12 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 6.5.0 Change-Id: Idbe34bde04510f7319d58e33ce52fd8324ddf868 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 6.5.0 Change-Id: I81e472cfacf8c6adf97b31e97254797d40b01519 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* 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 Pick-to: 6.5 6.5.0 Change-Id: I09dc19699858f24d3d83ff9e71e8233a036f710c Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Heartrate server: use permissions API to access BluetoothTimur Pocheptsov2023-03-034-9/+47
| | | | | | | | Add Bluetooth permission check/request to the heart-rate server's code. Task-number: QTBUG-109964 Change-Id: I7fc6a4cf6792e1aa223cc5dc4173963f995e305d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* btscanner sample - use permissions APITimur Pocheptsov2023-03-032-4/+34
| | | | | | | | Check and request a permission to use Bluetooth. Task-number: QTBUG-109964 Change-Id: I446f98fc15a2bd7bad97cff4a5937a43cc01e6dc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* lowenergyscanner: use permissions APITimur Pocheptsov2023-03-032-0/+26
| | | | | | | | | To explicitly handle Bluetooth permissions, not relying on QtBluetooth silently doing this under the hood. Task-number: QTBUG-109964 Change-Id: If8851e764bd0d06bddac815e8c8d1a88eb749438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* 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'. Pick-to: 6.5 Change-Id: Id8f92f429c5608089c2c8505100b7030debcf780 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QtNfc: Rewrite NDEF Editor example using Qt Quick ComponentsIevgenii Meshcheriakov2023-02-0859-1490/+1027
| | | | | | | | | | | | | | | 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. Pick-to: 6.5 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>
* Remove empty black space from AndroidJani Korteniemi2023-01-091-0/+3
| | | | | | | | | Removed black space from example by puting example in fullscreen if using Android. Task-number: QTBUG-106408 Change-Id: I51204de38b5d7528fcc88e1c9944b45c891926d4 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* examples: port bluetooth examples to new connection styleSamuel Gaist2022-11-252-7/+9
| | | | | | Fixes: QTBUG-108846 Change-Id: I09bd69625a0841cea6a642a8195369bbe566aee8 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-064-5/+5
| | | | | | | | | | | | | | 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. Task-number: QTBUG-99313 Change-Id: I9ace956ba9ee596ddf820623957f2d476036c5ed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2311-11/+11
| | | | | | | Task-number: QTBUG-105718 Change-Id: I8df2954bb61e0dc2a89f48c056b10a4bab395e0b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Wrap command line argument in \c{}Paul Wicking2022-08-181-1/+1
| | | | | | | | | Use correct text formatting; this also ensures the '--' part of the command line argument isn't converted to an en dash. Task-number: QTBUG-105729 Change-Id: I7df82e60e291b2bd28eb29b784110e0250bc12c0 Reviewed-by: Luca Di Sera <luca.disera@qt.io>
* Bluetooth heartrate-server: Handle errorsFriedemann Kleint2022-08-173-3/+18
| | | | | | | | | | | | Make it a console application and terminate on errors, printing a message. This prevents it from silently hanging, locking up the libraries, on Windows. Pick-to: 6.4 6.3 Change-Id: Ie7d022a2b193cf2c320cb918d35ce2ad52b2ac48 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Bluetooth heartrate example: increase scan time and remove QML warningsJuha Vuolle2022-08-172-3/+3
| | | | | | | | | | | | Increase the time for device discovery as it often takes more than 5 seconds to find the devices. Introduce formal function parameters to QML signal handler functions to remove the related warnings. Pick-to: 6.3 6.4 Change-Id: I79589803a1c6082f02fa13a9e0044a7c03ef0daa Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluetooth heartrate-game example: Use modern QML registrationFriedemann Kleint2022-08-167-5/+32
| | | | | | | | | Use the modern macros and replace setContextProperty(). Pick-to: 6.4 6.3 Change-Id: If83f8a2dfab13e7c1b3dd18048f633c47709a7b3 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluetooth heartrate-game example: Make simulation switcheable by command ↵Friedemann Kleint2022-08-159-61/+74
| | | | | | | | | | line arguments Introduce QCommandLineParser for simulation and verbosity settings. Pick-to: 6.4 6.3 Change-Id: I00d01d2fa73db311944a2df68c6b116f0a31811b Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluetooth heartrate-game example: Basic polishFriedemann Kleint2022-08-1524-62/+67
| | | | | | | | | | | | - Reorder includes by module - Reorder Q_OBJECT macros - Use member initialization - Update copyright year - Remove QML import versions Pick-to: 6.4 6.3 Change-Id: I00a817c07bf50efcb9fed60372c374d34d138640 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0811-0/+33
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ic31d264037cb00d72436d585820e45e4ccac5c60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1085-3995/+184
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ifc22d8ae24532e9a1093ca613ed6590a1992bc39 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* ndefeditor: fix dropdown menu problemsIvan Solovev2022-06-022-6/+27
| | | | | | | | | | | | | Because of QTBUG-98651 and QTBUG-97482 a QPushButton with a dropdown menu was not working properly neither on iOS nor on Android. This patch fixes the issue, but it's not optimal, because it re-creates the menu every time. Ideally we should provide QML-based GUI for the example. Task-number: QTBUG-103949 Pick-to: 6.3 6.2 Change-Id: Icd1e00f27f5c4864a33fa7f1f7755c0e919183cb Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Add NFCReaderUsageDescription key to NFC example appsJuha Vuolle2022-06-026-0/+98
| | | | | | | | The key is needed for iOS applications accessing NFC hardware Change-Id: Icbdd605504b2392934d7edc7f1daa192ffdef1c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove unsupported Android bluetooth codepathsJuha Vuolle2022-05-122-9/+6
| | | | | | | | | | | | | | | Minimum Android level supported on Qt 6 is Android 6 / API Level 23. This commit removes older unsupported code in order to simplify. This concerns primarily: - sdkVersion() checks - Java reflections (API availability was uncertain) Task-number: QTBUG-102497 Pick-to: 6.2 6.3 Change-Id: Ia90248a0a8f8e32130b8394998c2676c97a02eb5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>