summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Use forward declarations in new headersJannis Voelker2024-02-291-0/+13
| | | | | | Pick-to: 6.7 Change-Id: I1a433385e19723f34a1e16fe733528ff53bfc98e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Always add a comma to the last entry of an enumJannis Voelker2024-02-291-1/+1
| | | | | | Pick-to: 6.7 Change-Id: I17ed482908d50b0f16f695b0b6a61d744f21fd0a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Rename QOpcUaGenericStructHandler::initializeFinished to initializedChanged()Jannis Voelker2024-02-291-1/+1
| | | | | | Pick-to: 6.7 Change-Id: I05e5e143eb74b7cd51dcbd6498af5a194ca296c0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Use std::optional instead of bool to indicate success of de/encodingVolker Hilsheimer2024-02-201-4/+3
| | | | | | | | | | | | | | | QOpcUaGenericStructHandler is a new class in Qt 6.7, and has two functions that return values but might fail. The modern C++ way of doing this is to return a std::optional, rather than return a bool with the value returned through an out-parameter (or a default- constructed value with a boolean out-parameter to indicate success). Found during API review. Pick-to: 6.7 Change-Id: Ib2ba6098f53eccab73beace6844028d0b674ca65 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Review Simulation Server Ex: Add to documentationLena Biliaieva2023-12-213-8/+68
| | | | | | | | | | Create documentation. Update links for Water Pump examples. Fixes: QTBUG-120312 Pick-to: 6.7 Change-Id: I96b65cc6c5b9887d1b1c13e8e6438566115df4d9 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Simulation Server Ex: Refactor codeLena Biliaieva2023-12-212-33/+132
| | | | | | | | | | | Use a literal operator u""s to create QString. Clean-up includes. Fix too long lines. Task-number: QTBUG-120312 Pick-to: 6.7 Change-Id: I3a9f3cb3f48e53896f41ebd55b0350f6ab314b97 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Review QtOpcUa X509 Support Ex: Review documentationLena Biliaieva2023-12-202-1/+33
| | | | | | | | | | | Remove "Example" from the title. Update documentation with the more detailed description. Update example names at QDoc config file. Task-number: QTBUG-119845 Pick-to: 6.7 Change-Id: I64a69fd79e20687234b438d2c1d411b566c4b93d Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Water Pump Ex: Review documentationLena Biliaieva2023-12-204-13/+21
| | | | | | | | | | | | | Remove "Example" from the title and change "Waterpump" with "Water Pump". Add quick and qtopcua as tags. Update screenshot to improve dpi resolution and respect 4:3 ratio. Update documentation description. Task-number: QTBUG-120134 Pick-to: 6.7 Change-Id: I18c41036d82fa639ed1b9a59e4fe9f2cac3ca6f2 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
* Review Water Pump Ex: Refactor codeLena Biliaieva2023-12-209-33/+120
| | | | | | | | | | | | Silenced qml warning. Fixed unqualified access qmllint warning. Fixed too long lines. Fixes: QTBUG-120134 Pick-to: 6.7 Change-Id: I962c2655136ba30b3d1dfe0d8d07fce577bb176a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
* Review Water Pump Ex: Cleanup includesLena Biliaieva2023-12-204-6/+4
| | | | | | | | | | Cleanup includes and imports in qml files. Task-number: QTBUG-120134 Pick-to: 6.7 Change-Id: I7933e98ba74ca7e34fabfadc2a4c2cdf4c9ea533 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
* Review QtOpcUa X509 Support Ex: Refactor codeLena Biliaieva2023-12-191-12/+14
| | | | | | | | | | | Use a literal operator u""s to create QString. Sort includes in alphabetical order. Fix typo. Task-number: QTBUG-119845 Pick-to: 6.7 Change-Id: I6c2b806960b86e9917132256d4763552ef751310 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Water Pump Ex: Refactor string literalsLena Biliaieva2023-12-192-35/+41
| | | | | | | | | Use the literal operator u""s to create QString. Task-number: QTBUG-120134 Pick-to: 6.7 Change-Id: Iaec0b546c2da20adf79a7f681900e1dcde8fb434 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review QtOpcUa Viewer Ex: Fix includesLena Biliaieva2023-12-186-42/+47
| | | | | | | | | | | Clean up #includes, use forward class declarations. Fix spacing. Add explicit. Task-number: QTBUG-119786 Pick-to: 6.7 Change-Id: Ibf8828eb038cdbcff178c406f275e2c8ed29a172 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review QtOpcUa Viewer Ex: Refactor string literalsLena Biliaieva2023-12-156-47/+58
| | | | | | | | | | Replaced QLatin1String with QLatin1StringView. Replaced QStringLiteral with _s operator. Task-number: QTBUG-119786 Pick-to: 6.7 Change-Id: I0e1cb6d39f8185dca56ab2671c86c5b19cfb1673 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Qt Quick Waterpump Ex: Use a Literal operator to create QStringRym Bouabid2023-12-131-1/+3
| | | | | | | | | | | Create QString at compile time using the literal operator u""s instead of QStringLiteral(""). Fixes: QTBUG-119784 Pick-to: 6.7 6.6 6.5 Change-Id: I0f88e212ab86e2fb8e8bb5875fdebf3de3782fce Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Review Qt Quick Waterpump Example: Revisit the documentationRym Bouabid2023-12-133-7/+15
| | | | | | | | | | | Remove "Example" from the title and change "Waterpump" with "Water Pump" Add quick and qtopcua as tags. Update the example screenshot. Task-number: QTBUG-119784 Pick-to: 6.7 6.6 6.5 Change-Id: Ib02110fcba3685a2ed3011f1c2e09e3760fce41d Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Qt Quick Waterpump Example: Fix too long linesRym Bouabid2023-12-132-9/+17
| | | | | | | | | Fix code lines that do not respect the 100 characters limit rule. Task-number: QTBUG-119784 Pick-to: 6.7 6.6 6.5 Change-Id: I9a65ae66a70a3d00f9db85bad5cbc9f27bb678da Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review Qt Quick Waterpump Example: Fix includesRym Bouabid2023-12-131-4/+7
| | | | | | | | | | Fix include order. Add needed includes to avoid Transitive includes. Task-number: QTBUG-119784 Pick-to: 6.7 6.6 6.5 Change-Id: I35328f137c356b00798549ae9a46c9729ffb991a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review QtOpcUa Viewer Ex: Silence warningsLena Biliaieva2023-12-111-19/+6
| | | | | | | | | Removed unused variable. Refactored to silence constant-out-of-range-compare warning. Task-number: QTBUG-119786 Change-Id: I988c386a10eed91a1be8e002f090be761623a135 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Review QtOpcUa Viewer Ex: Review documentationLena Biliaieva2023-12-112-1/+1
| | | | | | | | | Remove "Example" from the title. Update example screenshot to fit 4:3 ratio. Task-number: QTBUG-119786 Change-Id: I7edc683047486ccb8cf64b0988590597b8a6b5e5 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Remove the UACPP pluginJannis Voelker2023-11-201-4/+0
| | | | | | | | | | | | | | The Unified Automation plugin was only partially ported to Qt 6 and was since then mostly unmaintained. New feature introduced since 5.15 and later were only available for the open62541 backend. [ChangeLog][Qt OPC UA] The Unified Automation backend has been removed. The open62541 backend will be able to act as a drop-in replacement for everything except the connectError() signal. Change-Id: I7e859133bb973256cdfe8eb9b6949379acb689b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Vladimir Minenko <vladimir.minenko@qt.io>
* Fix issues pointed out by clazyJannis Voelker2023-09-262-6/+6
| | | | | Change-Id: Ia530dd568f2247f6aca97253b8f28dd99392b956 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Add generic struct handlerJannis Voelker2023-09-135-1/+43
| | | | | | | | | | | | | | | | This change adds a class which traverses the data type hierarchy of an OPC UA server and provides a method to decode and encode generic structured types from/to extension objects. The server must expose the structure definition in the DataTypeDefinition attribute of the DataType node. [ChangeLog][Qt OPC UA] Qt OPC UA has been extended with a generic struct handler which enables the user to automatically decode structured types having the DataTypeDefintion attribute set. Change-Id: Ia1125f68d7da3c2687e8900bbc66d3312e10b837 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Add error message to some examples when building for AndroidElias Hautala2023-08-212-0/+8
| | | | | | | | | Add error message to x509 and simulation server examples. Task-number: QTBUG-111933 Pick-to: 6.5 6.6 Change-Id: Ia0b9f1af3c84e98fddbed412a11e23d2abd6f10b Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Doc: Add example categories for Qt OPC UA examplesMats Honkamaa2023-08-174-1/+5
| | | | | | | Task-number: QTBUG-116162 Pick-to: 6.5 6.6 Change-Id: I904a258aa8579f4f575b424f774f5b84f22eb4cd Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Exclude some examples from Android buildElias Hautala2023-08-172-1/+3
| | | | | | | | | | Excludes x509 and waterpump example from Android build because of missing Qui and Quick dependencies. Task-number: QTBUG-111933 Pick-to: 6.5 6.6 Change-Id: Idb18ad1e8602393b8f25797b229c1c08d0eaec07 Reviewed-by: Jannis Völker <jannis.voelker@basyskom.com>
* Fix and improve X.509 key usage and extended key usageJannis Voelker2023-07-283-27/+35
| | | | | | | | | | | - Fix extended key usage with OpenSSL 3.0 - Client certificates need extended key usage clientAuth - Add new certificate to the OPC UA viewer example Change-Id: Ib0664bc4fc1edb4e5d3b6f78e1cdfc9e9655ac7c Pick-to: 6.5 Pick-to: 6.6 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Modernize the X.509 example and make it more genericJannis Voelker2023-07-281-2/+6
| | | | | | | | | | | Use 2048 bits for the private key. Only the Unified Automation plugin supports private keys with password. So the example should create a key that can be used by both plugins by default. Change-Id: Ia46b345ff0666ae6dcf17a698934e6fb1ff7cce7 Pick-to: 6.5 Pick-to: 6.6 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Doc: Remove \ingroup all-examples command from the docsJaishree Vyas2023-07-121-1/+0
| | | | | | Task-number: QTBUG-115044 Change-Id: Ib87fea92a6ac141061aea648777268a0b914bd74 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* OpcuaViewer: Don't locate files relative to binaryKai Köhne2023-02-244-54/+66
| | | | | | | | | | | | | | | | The logic to locate files relative to the binary is fragile. It is currently broken for CMake on Windows, and not actually implemented in qmake. Furthermore, it requires the binary directory to be writable at runtime, because additional folders will be created there. Instead, embed the files via qrc, and extract them at runtime into AppLocalDataLocation, which we know we can read/write to. Pick-to: 6.4 6.5 Fixes: QTBUG-109097 Change-Id: Ia6994339f4eba94ee6ef0cd82eadcc72563b7d47 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* OpcuaViewer: Do not wrap API in Qt namespaceKai Köhne2022-12-218-38/+12
| | | | | | | | | | | | | | | The custom Qt namespace should be reserved for Qt library types, not example types. THerefore remove QT_BEGIN_NAMESPACE, QT_END_NAMESPACE macros. To keep compatibility with a namespaced Qt, we now include the respective headers, instead of pre-declaring Qt types. Also sort include lines while at it. Pick-to: 6.4 6.5 Change-Id: I8c4c6f5f2b5768eae297923e0081820ade8e50f4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* qtopcua: fix simulationserver source lookupShyamnath Premnadh2022-12-142-3/+9
| | | | | | | | | | | | - for Qt major greater than 5, look up the sources in 'Src' folder in the Qt installation - the orginal relative path for MODULE_SOURCES given was also wrong. This is now fixed. Fixes: QTBUG-109096 Pick-to: 6.2 6.4 6.5 Change-Id: Iabcf8baaf1a440b863aaf9ead3cfbb63c98d8b02 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Modernize example's CMakeLists.txtKai Köhne2022-12-136-35/+34
| | | | | | | | | | * Use qt_standard_project_setup() * Use Qt6:: prefix, instead of Qt:: * Use private linkage wherever possible Pick-to: 6.5 Change-Id: I8af4fdeed78f7cba26308f1c7932e6f9fc256ade Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update open62541 to 1.3Martin Klos2022-11-112-24/+24
| | | | | | | | | The open62541 plugin now supports the Aes128_Sha256_RsaOaep security policy. MacOS on M1 has been disabled due to issue #5198 in open62541. Change-Id: I8b1cf704a9a0532fa9eb2c9099cac62ac9263a49 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-072-2/+2
| | | | | | | | | | | | | | 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: Ica78a615605aebc9c592d12840e9ddbbc19af430 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-258-8/+8
| | | | | | | Task-number: QTBUG-105718 Change-Id: Ia8401e033fc4b7414e798d1cc5da90977ad5f29b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-078-0/+24
| | | | | | | | | | | | 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: I775b4a5dd13b8e930cef494af42f81ec6f8b242a Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1640-1853/+88
| | | | | | | | | | | 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: I5678b086dc1da06fc2045a82b5678949b40f267e Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove .prev_CMakeLists.txtKai Köhne2022-03-223-174/+0
| | | | | | | | Amends fc9ee3e00 Pick-to: 6.3 Change-Id: Ida41cb7d8db01999db845bc5081d4cce6f902a05 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Remove version numbers from QML importsKai Köhne2022-03-1418-54/+54
| | | | | | | | | | | Explicit version numbers in QML imports are optional since Qt 6, and actually not recommended. Pick-to: 6.3 Fixes: QTBUG-99989 Change-Id: Ife02a1b7ca97215ccc39e20013715cb10ce55b3e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Improve examples CMakeLists.txtKai Köhne2022-02-178-70/+24
| | | | | | | | | | | | | | | | | - Remove "# Generated from xyz.pro" comments - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: I3762fc4a17e5b8047ebdc721d0a9efffa163ba2d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Fix includes and forward declarations according to code reviewJannis Voelker2022-02-082-0/+3
| | | | | | | | | - Some includes could be replaced by forward declarations - Public headers must always use include <foo.h> Pick-to: 6.3 Change-Id: I8187461babb0df6554b759db41887d528c673af9 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Switch examples to build as isolated sub-builds part 2Alexandru Croitor2022-02-081-1/+1
| | | | | | | | | | | | | | | qt_examples_build_begin needs the EXTERNAL_BUILD flag to know that it's safe to build examples as ExternalProjects. It still won't do it in CI until we enable building examples as ExternalProjects for prefix builds. This is preparation for that. Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: Iccf39b9cd7ba092a0ff050781905cf56068135fe Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-152-5/+5
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: I66ac3eb1dc59dfaa6754d396acffb0a62084624e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use up-to date LGPL license headerKai Köhne2021-12-022-36/+64
| | | | | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Use BSD instead in the examples, updated LGPL otherwise. Also remove the now unreferenced LICENSE.LGPLv3, LICENSE.GPLv2 files. Change-Id: I331898db70f1a566baffe57d0bb6a72d4bfbd382 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add an API for historical data accessPeter Rustler2021-10-155-9/+76
| | | | | | | | This feature is currently limited to open62541 and the "read raw" functionality of OPC UA part 11. Change-Id: I6c7e8f24e09019b671ad82ad16ccdafc3357a47e Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-175-5/+5
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I821f412f9dbe11ae99ffd888a7ab2ba415ed9379 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change all QString("foo") constructions to use QStringLiteralUlf Hermann2021-07-012-3/+6
| | | | | | | | You should not construct QStrings directly from C string literals. Change-Id: I4185376ab62d19c26864afe656e4d7236d20d44c Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* add value monitoring to viewer examplePascal Dietz2021-04-074-0/+63
| | | | | | | | | | | | | A custom context menu was added to the treeview of the viewer example which is accessible by right-clicking a variable node entry in the value column. Through the context menu monitoring for the value attribute can be enabled/disabled. For non-variable nodes the context menu entry is disabled. Change-Id: I1a1f8371293d2f1fd46f5bfaa11cd06c661d6dd8 Reviewed-by: Jannis Völker <jannis.voelker@basyskom.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* Fix OPC UA viewer connection issuesMartin Klos2021-01-282-0/+3
| | | | | | | Connection establishment failed because of missing certificate and wrong datatype in source Change-Id: I8db7a544e7a4c58ec7bf721d2834a5298c665526 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>