summaryrefslogtreecommitdiffstats
path: root/examples/scxml
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-06-1476-3333/+152
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Ic435d3a484be01542f27431068419a2c252bd1f6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 418cf1a0b9d35d76740e5405c245ce2fb30687bd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve examples CMakeLists.txtKai Köhne2022-02-2118-169/+112
| | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - 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: Iaf7286069494041e90a59cedeae30ef26713d538 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-151-17/+17
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: If98118e7f8fb9fc2dce8ab1c0da6b104053b822e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-1717-17/+17
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I821f412f9dbe11ae99ffd888a7ab2ba415ed9379 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Work around CMake 3.21.0 AUTOUIC issue with cross config NinjaAlexandru Croitor2021-07-231-7/+10
| | | | | | | | | | | | | | | | | | | | A few qtscxml examples fail to build in-tree with the libraries build when using CMake 3.21.0 + Ninja Multi-Config + cross config mode enabled. The example targets use AUTOUIC with ui files pointing to parent directories and that somehow causes a ninja dependency issue. Work around the issue by excluding those examples from the build when using NMC + cross config. In our CI that means the Windows -debug-and-release builds. Pick-to: 6.2 Task-number: QTBUG-95305 Change-Id: I631256bfa4258f8d9cbe1e947f76cf4d4c56b385 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Enable non-gui builds of qtscxml and statemachine examplesJuha Vuolle2021-04-011-1/+1
| | | | | | | | | | | | | | | | | This commit enables building the modules against Qt with -no-gui set. While library compilations were possible, the examples failed to compile as QML libraries may be present without gui. This is different root cause than in the original bug item due to the qmake => cmake migration, but end goal of this commit is the same. Additionally the few examples without gui dependency are now built. For clarity: most auto tests link against gui and are thus not 'enabled' as part of this commit. Pick-to: 6.1 Task-number: QTBUG-60045 Change-Id: Ifc184eb95aa465f6e7ab832b4c13017f81a47e88 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtScxml: Fix spelling in example documentationTamas Martinec2021-03-102-3/+3
| | | | | | | | Pick-to: 6.1 Task-number: QTBUG-89834 Change-Id: I6d24eeeddaac69ed2f4c74c77344452dee457a78 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* QtScxml: Fix parameter injection into signal handlers deprecation warningsTamas Martinec2021-02-242-2/+2
| | | | | | | Pick-to: 6.1 Task-number: QTBUG-89834 Change-Id: I9e421abc841b944813d2233a67f4cc0ab104e9c0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtScxml: Improve ftpclient exampleTamas Martinec2021-02-234-5/+21
| | | | | | | | | | | | - Added more error handling - Added more debug info - Added example usage - Fixed output not showing on windows Pick-to: 6.1 Task-number: QTBUG-89834 Change-Id: I4245a33fed7f738007bdc0b3495951a89d3c896d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Qt State Machine standalone documentationJuha Vuolle2021-02-178-11/+11
| | | | | | | | | | | | | The Qt State Machine was carved off of the qtbase and qtdeclarative repositories and relocated to the qtscxml repository as a neighbor of the scxml state machine. As such the Qt State Machine had several fragments of existing documentation, but no qdoc packaging to make them work as a standalone documentation. This packaging and related necessary changes is the essence of this commit. Pick-to: 6.1 Task-number: QTBUG-89833 Change-Id: I43d8f8145d4467bd48dbf4674fa28a29671de868 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Qt6 related documentation changes for scxml moduleJuha Vuolle2021-02-1121-129/+198
| | | | | | | | | | | | | | | | | | | Some perhaps less-obvious changes are: -Remove nonexistent imagedirs reference in qdocconf -Address some qdoc warnings (“/“ usage in an example and also std::function handling) -Fix ftpclient example filename references -Mark an escaped Q_OBJECT usage as badcode to suppress qdoc warning The Q_OBJECT itself cannot be unescaped as automoc will then fail. It shouldn't but that is the case. -Change the examples’ CMakeLists.txt to use single-line find_packages to ensure packages are not mixed and matched. Probability for problems is low but perhaps since these are examples that is appropriate Pick-to: 6.1 Task-number: QTBUG-89833 Change-Id: Ibf518aa71971e8e9d0af1b49c7de86fd28089e96 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QML versioning and registration update for QtScxmlJuha Vuolle2021-01-295-12/+12
| | | | | | | | | | | | The main changes: -QML element versioning so that “import QtScxml” works from version 5.8 to latest 6.x -QML element registration to use the newish QML_ELEMENT and friends -Automatic plugins.qmltypes generation during build Task-number: QTBUG-89832 Change-Id: If6b031fbbe4b4143f4fad626c9a71f55e571491a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* An attempt to fix --no-gui cmake CI build of the QtScxmlJuha Vuolle2021-01-281-2/+8
| | | | | | Task-number: QTBUG-89828 Change-Id: Ia3708141ec1e8d787055cd0bddb2280b8f4d81ff Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Re-generate all CMake filesJoerg Bornemann2021-01-1917-34/+170
| | | | | Change-Id: I40dd28da4ba47bd15471b471138900cd22b4e409 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Merge remote-tracking branch 'origin/wip/cmake' into devJoerg Bornemann2021-01-1818-0/+1010
|\ | | | | | | Change-Id: Id18b041d49c8ddebdb4aff404e438700d0441948
| * Regenerate before mergeAlexandru Croitor2019-10-1517-22/+34
| | | | | | | | | | Change-Id: Ib78bff1d61ee9526b9e3373dbf109ae4d2dd81dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Port QtScxml to CMakeJoerg Bornemann2019-09-2618-0/+998
| | | | | | | | | | | | Change-Id: I227f18b6a9825b6974eab6ba9feaf62bd0934133 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Adapt to latest qtbase changes, bump dependencyKarsten Heimrich2020-08-281-0/+1
| | | | | | | | | | Change-Id: Ibe2af360f7fd63dbc541eaf1218935519886ef40 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-06-263-8/+8
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: Ibaf2524e49e75ec660889261347eddbae9ccdbc6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Use "QtQuick.Window 2.2" in calculator-qmlAssam Boudjelthia2019-12-181-1/+1
|/ | | | | | | | With version 2.0 the layout is not correct on Android, version 2.2 works well. Change-Id: I7df2d8ecd0e623fe437d9a47e24b8557651f1e1e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* examples: depends on Quick instead of QmlLiang Qi2019-02-131-1/+1
| | | | | Change-Id: I5c824bb2e91b3e7d3a2bb70feb1d8419827482c9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't use foreachJarek Kobus2018-05-021-1/+1
| | | | | | Task-number: QTBUG-60649 Change-Id: I28efb8711343196cd89b1edbae455a9e04422e4b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Wrap examples' code at 80 columnJarek Kobus2018-05-0210-27/+54
| | | | | | | | According to https://wiki.qt.io/Writing_Qt_Examples Task-number: QTBUG-60649 Change-Id: I17073bb3caf32ccd17d93542876a73ed939f12bd Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix coding style issuesJarek Kobus2018-05-021-1/+1
| | | | | | Task-number: QTBUG-60649 Change-Id: I080ddb7b6b7021a2597ddc19bc820f1c92abcc41 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Use canonical include style and sort #includeJarek Kobus2018-05-0211-18/+18
| | | | | | | | See also https://wiki.qt.io/Writing_Qt_Examples Task-number: QTBUG-60649 Change-Id: I3a5671f39e870f96546e66427cc9434f41777e33 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Give examples a meaningful window titleJarek Kobus2018-05-023-9/+0
| | | | | | | | They will get the app name, like other examples Task-number: QTBUG-60649 Change-Id: Ib66a37e0c1253f12d9fa0ec19a2f1220e7277f05 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* examplesrevamp: Don't include QtWidgetsJarek Kobus2018-05-021-1/+2
| | | | | | | | Include only what's needed. Task-number: QTBUG-60649 Change-Id: I9c1423c56afe85f65a36f7f7982b96e87fade012 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devv5.11.0-alpha1Liang Qi2018-02-013-0/+3
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/scxml/qscxmlcompiler.cpp Change-Id: Ie338e2c6a09e2d885d5f57a80abd386065ac8bc8
| * qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-123-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-53141 Change-Id: I22a1d247e8debe5b1b700cc810de2f3b4ab7ce23 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Make the network dependency explicit in the exampleKarsten Heimrich2018-01-231-1/+1
| | | | | | | | | | | | Change-Id: I0c12d9a1eacaf71ea3b061ac1b1cdd3bf4500157 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-202-13/+18
|\| | | | | | | | | | | | | Conflicts: src/scxml/qscxmlcompiler.cpp Change-Id: I4abda984e523cdf2a0810ed7dc1773e055746e18
| * QML code improvements for examplesMichael Winkelmann2017-09-112-13/+18
| | | | | | | | | | Change-Id: I0f7bfc749e41071268d107d3250910de918a2d0a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-212-6/+6
|/ | | | | Change-Id: I68e08fd214ad3dbf4de9c9e23b1725950925c1fb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update examples to C++11Michael Winkelmann2017-07-189-19/+18
| | | | | Change-Id: If23693387da9e5c0a102041298f626a068b26f6d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix the layout of lights in simple trafficlight exampleJarek Kobus2017-07-051-0/+2
| | | | | | Task-number: QTBUG-61313 Change-Id: I15ed8c33a25f1fa06e7635168775249199b0cd52 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Update screenshots of examples to show Windows 10 styleLeena Miettinen2017-05-243-0/+0
| | | | | | | | | - Calculator - Mediaplayer - Sudoku Change-Id: I4eaa71d178f81f9d317de2f3626b7fb08e5776e1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Make ftpclient example valid scxmlUlf Hermann2017-02-072-2/+3
| | | | | | | | | | Section 6.2.3 of the standard says "A conformant SCXML document MUST specify exactly one of 'event', 'eventexpr' and <content>." Therefore we cannot use <content> with 'eventexpr', but we can use <param> instead. Change-Id: I64c0ec8a1f08d5b441e5b52a83800800f8a99d03 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* TrafficLight example: prevent resizing past implicit background sizeMitch Curtis2017-01-021-0/+2
| | | | | | | | | | We don't have anything to display since our background image isn't scalable, so just prevent resizing past the implicit size of the background image to avoid a black region being visible. Task-number: QTBUG-57476 Change-Id: I57e55f860b3447c6940c90b04b8b4e1b0f87d484 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Update docs according to recent changesJarek Kobus2016-11-141-2/+2
| | | | | Change-Id: I5b2c8827bbfef749b51b904314ed822fdf150d20 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix docJarek Kobus2016-11-141-1/+1
| | | | | Change-Id: I406500e76deb4e0956aa671319bb01319012a7cd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add docs for sudoku exampleJarek Kobus2016-11-145-4/+396
| | | | | Change-Id: I956a0c8d030475ff7ec00dabfeffd980918fde2a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a sudoku exampleJarek Kobus2016-10-1710-0/+674
| | | | | Change-Id: I08a0c053a195dd55e6ff796b89a19ee160eb152d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Use std::function for onEntry and onExit return typesUlf Hermann2016-10-142-7/+0
| | | | | | | | | This allows us to drop the C++14 requirement. As onEntry and onExit are template functions we don't need to care about (not) using the standard library for them. Change-Id: Ie776e04f7e1771914c9f48d2440ef445d87d64c0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Use QByteArray rather than QString for ftpclient exampleUlf Hermann2016-10-146-24/+23
| | | | | | | | This makes the code simpler and relieves us of the need to assume any specific character encoding for the communication with the server. Change-Id: Icc31e963f95eeff4a13e69c3d25d6f0d400a9d13 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Re-enable building of examples on MSVCUlf Hermann2016-10-041-2/+0
| | | | | | | | Apparently the tests work on MSVC, so we should be able to also revert the examples side of 65964f13e9156b4ec26707d916f6f8e56582a024 . Change-Id: I0c876630b0b722870a141922f0bd5211ee46b5f4 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Update plugins.qmltypesUlf Hermann2016-09-275-9/+9
| | | | | | | | | | | | | | | Also, have the extended state machine type follow the usual naming scheme, and increment the minor version everywhere. Since we don't need to be compatible with 5.7 we don't need to drag the 5.7 version around at all. In addition, we also don't need to namespace QtScxml in any QML context and, using the additional type information, we can easily constrain the types of all state machiens in QML. The fromFile() and fromData() methods don't have to be Q_INVOKABLE and that just confuses qmlplugindump, do drop Q_INVOKABLE there. Change-Id: I7bd3f10ac458d64fcb98caece770b5d4c61abdb5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Doc: fix code snippet in Mediaplayer QML Dynamic ExampleLeena Miettinen2016-09-271-1/+1
| | | | | | | Apparently, the example code has changed. Change-Id: I69cd7da627a4ac3a3ac41435dd0aeedb1eb0a009 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Add docs for FTP Client exampleLeena Miettinen2016-09-262-0/+144
| | | | | Change-Id: Ifa1a02d0a36951dec7a956fe3cd2840dc55c8c28 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace Q_FOREACH/foreach with ranged-forErik Verbruggen2016-09-251-1/+2
| | | | | Change-Id: I7b4d13a49577a7d984727722ff2ae4458eab2d6e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a simple FTP client exampleUlf Hermann2016-09-238-0/+629
| | | | | | | With the provided FTP client you can fetch text files via anonymous FTP. Change-Id: I622264d72aac71492bf474dc1936917fdc78d499 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>