summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* qscxmlc: Don't compress the templatesThiago Macieira2019-06-202-9/+6
| | | | | | | | | Those files are small, so we may as well not bother. Fixes: QTBUG-76521 Change-Id: Ief874765cd7b43798de3fffd15a9f511bc9c723a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use final keywordJarek Kobus2018-05-021-10/+10
| | | | | Change-Id: I727f6580a9060e1cab1a33cba0e42fdf9b34c739 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Examples: Use override keywordJarek Kobus2018-05-021-10/+10
| | | | | Change-Id: I7191e2020e8c9ec4abe94e0ee5b730270fa66d13 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix coding style issuesJarek Kobus2018-05-022-5/+5
| | | | | Change-Id: Ica7d960babffbf2ef1e6e43c032c236de4a3472e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-272-12/+12
| | | | | Change-Id: I6bee476e2f467b57ee8e4bba1e780cf79c7a460e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unneeded member and dead codeJarek Kobus2017-08-142-6/+2
| | | | | Change-Id: I62b214add022b4725a81297217616d8548db5c7e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix build without features.commandlineparserv5.9.0-beta2Tasuku Suzuki2017-04-031-1/+1
| | | | | Change-Id: I47398d653d4d3a9655e8d4480ffe4f7c3472e67b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devv5.9.0-alpha1Liang Qi2017-01-254-9/+21
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I639eb3acef7004a20447bbb66fb44661bf8e952e
| * remove obsolete host build declarations from subdirs projectsOswald Buddenhagen2017-01-181-2/+0
| | | | | | | | | | | | | | follows up qtbase/4eb2feb2. Change-Id: I967126f8ae400f9cf8d49683920e71df960b1763 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-043-5/+19
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/scxml/qscxmlinvokableservice.cpp tools/qscxmlc/scxmlcppdumper.cpp Change-Id: Iadbe84d8eae7ccdf8dd9a0109af236a3747976c8
| | * Fix header guardsUlf Hermann2016-11-291-3/+3
| | | | | | | | | | | | | | | | | | | | | They should reflect the file name. Change-Id: I4f1ba1b98b673cfcb9ccacc8d83a42e06b1f2a3d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| | * Merge 5.8 into 5.8.0Oswald Buddenhagen2016-11-295-39/+15
| | |\ | | | | | | | | | | | | Change-Id: I8fa59d8b2559aa620eb533ed4274ea1b7374d2c7
| | * | Reduce the public API exposed in qscxmlinvokableservice.hUlf Hermann2016-11-292-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We inline QScxmlInvokableService::finalize into the only place where it is used. Furthermore we construct static SCXML state machines through their metaobjects rather than directly calling the constructor. This way we can drop the template, make all the service factories QObjects, drop the intermediate QScxmlScxmlServiceFactory class, and greatly reduce the API exposed in qscxmlinvokableservice.h. In addition, as some of the structs in QScxmlExecutableContent are fairly large, we return them as const references, rather than by value. Change-Id: Ia9ee61b5668b8af44307787339c08f3c6f23f713 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * | | Resolve the mixup of various ID typesUlf Hermann2016-12-191-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | We should not compare instances of different IDs with one another. Change-Id: I830d747ffde4c162c73475a600cef23e10c898e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* / | Optionally generate accessor and signal methods for statesUlf Hermann2016-12-138-13/+117
|/ / | | | | | | | | | | | | | | | | | | | | | | We can easily do this and provide a much nicer API. These methods are not available for dynamically loaded state machines. By default we provide the same API for compiled and loaded state machines. The new methods are only generated if you pass the "--statemethods" parameter to qscxmlc. A new qmake variable called "QSCXMLC_ARGUMENTS" is added for any extra arguments to qscxmlc such as this one. Change-Id: Ie7a4eb4890c9d42f89093f3cf3ea917ef2793518 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Drop the --no-c++11 parameter from qscxmlcUlf Hermann2016-11-234-33/+9
| | | | | | | | | | | | | | We don't support C++98 anymore, so this is useless. Change-Id: Ie918567253af6d9309b601c7cfbc0205ec888048 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Fix qscxmlc documentationUlf Hermann2016-11-231-6/+7
| | | | | | | | | | | | | | | | The arguments have been renamed. Change-Id: If8d504f5ce859cfd5600a37cc754be5106de49ca Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Remove redundant "public:" from generated headersUlf Hermann2016-11-231-1/+0
|/ | | | | | | | | | Conventionally Q_OBJECT and Q_PROPERTY is before the first access specifier. Change-Id: I4d93c08ada356d1a3695141852095224a215793b Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Drop the NOTIFY part from generated Q_PROPERTY macrosUlf Hermann2016-11-181-5/+2
| | | | | | | | | | They are unnecessary for code completion and somewhat wrong because the signal methods don't actually exist. Change-Id: Ie5326791aaf574fffc9f38b3c6bc786c1204ab45 Task-number: QTBUG-57174 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Further clean up qscxmlinvokableservice.hv5.8.0-beta1Ulf Hermann2016-10-272-38/+46
| | | | | | | | We can group the various parameters passed around between the factories into a struct and we can move some methods into the private interface. Change-Id: I579ced7d501bdb617d4aefd47ced49746c9a5b94 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Do not accidentally generate <::Erik Verbruggen2016-10-181-2/+2
| | | | | | | | | C/C++ uses <: as a digraph (for an opening bracket), so templateName<::namespaceName::className> would generate errors. Task-number: QTBUG-53719 Change-Id: I32890db75e56470befeae0866307a6421ca3f911 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Rename QScxmlParser to QScxmlCompilerUlf Hermann2016-10-143-13/+13
| | | | | | | | | It creates an executable representation from an XML description, so it is a compiler and not merely a parser. The name should reflect this. Change-Id: I459445706207b3afae64b3f803c9beae83114bb6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Clean up qscxmlinvokableservice.hUlf Hermann2016-10-141-2/+2
| | | | | | | | | | | | | | | | This is public API, so it should follow some minimal standards: * Use QObject's d pointer where possible * Follow the FooPrivate naming scheme for private classes * Don't expose any data members in the public interface * Give the various service classes somewhat logical names * Drop some #ifdefs (qscxmlinvokableservice.h isn't used for qscxmlc) Unfortunately we cannot drop any actual functionality from this header as we need all of it for the generated C++ code. Change-Id: Idd2698f7a331548eb1bf2d20da405a0fe05a92f0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Simplify qscxmlexecutablecontent.hUlf Hermann2016-10-143-4/+16
| | | | | | | | | The only things we actually have to export are a few structs and typedefs. As we have to keep this binary compatible we should strive to make it as simple as possible. Change-Id: I54d365530800c86ecc3d859d6daea94e05b893a0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Rename QScxmlExecutableContent::Instructions and make byte code constUlf Hermann2016-10-141-1/+1
| | | | | | | | | | "Instructions" was quite ambiguous as there are instruction IDs and instruction structs. It actually meant an array of IDs. The execution engine should never modify its byte code, so while we're at it, we can also make all relevant occurrences of InstructionID* const. Change-Id: I9370b07a5a9cdb8c7b41b23648fc1b8b2dea7dcd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Replace Q_FOREACH/foreach with ranged-forErik Verbruggen2016-09-252-12/+14
| | | | | Change-Id: I7b4d13a49577a7d984727722ff2ae4458eab2d6e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up includesUlf Hermann2016-09-224-17/+16
| | | | | | | | This will hopefully enable us to build qscxmlc with force_bootstrap on macOS. Change-Id: Ib5d9494fae86b9bb12625aadb9ae3fac0a234520 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't generate empty switch statements for C++ data modelsUlf Hermann2016-09-142-44/+55
| | | | | | | Some compilers will complain about them. Change-Id: I82bee601480e43ce00657d609d30179fe17e6bdb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Get rid of qt modeJarek Kobus2016-08-235-218/+10
| | | | | Change-Id: Id8cc29a9a27f571f063b1cec51e534a3c762f2c6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* In Qt mode reject documents with events that cannot be mapped to slotsUlf Hermann2016-08-181-12/+0
| | | | | | | | | | | This severely limits the use of Qt mode, as hierarchical events like done.state.foo cannot appear in the document anymore. However, it makes the rules about what is and what is not legal in Qt mode more consistent. Task-number: QTBUG-53435 Change-Id: I08b90f34c651a57d86607eea2a38f5bd1f73b8b3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Make generated signals publicUlf Hermann2016-08-091-1/+1
| | | | | | | | | | | Access control for signals cannot be enforced anyway and QML has a bug that makes the type compiler crash if anything tries to connect to a private signal. Besides, they should be accessible from other code. Change-Id: I9af527f012e3ea8538107b74ce20157f01fef6ae Task-number: QTBUG-51817 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Don't generate properties and getters for sub state machinesJarek Kobus2016-07-291-67/+0
| | | | | | | Now we have a generic API for it. Change-Id: I5e48f52b9d27ba3913db92ba238d64a732bb1bd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Generate forward declarations for all submachinesJarek Kobus2016-07-281-5/+3
| | | | | | | Before, we've skipped the first machine twice. Change-Id: Ia85f01139bd948aec0b2422b9f9bedfa6261148d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Ensure sub machines are generated always in the same orderJarek Kobus2016-07-283-22/+20
| | | | | Change-Id: I116af61b6843d4e6e6877d77be662cd9828ef8ba Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Generate unique class names for sub machinesJarek Kobus2016-07-281-1/+8
| | | | | Change-Id: I3a83e12a611a6c4c2ab86a45b44e168b62bb7da3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Pass the meta object of the implementation to QScxmlStateMachineUlf Hermann2016-07-131-1/+1
| | | | | | | | | This way we can treat all signal indices as local, without running into problems with derived classes and their signal offsets. Change-Id: I7a9d3b56edf46ff0736cdae5ebaa950adda4ee32 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Avoid compile warnings about empty switch statementsUlf Hermann2016-07-122-5/+10
| | | | | | | | MSVC 2015 doesn't like switch statements with nothing but a default clause. Change-Id: Iddce723fef54b61ae52d9256160c2fc44844bd0b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Drop unnecessary semicolon after Q_DECLARE_METATYPEUlf Hermann2016-07-081-1/+1
| | | | | Change-Id: I25e991215774f879ad3f948143d337eaf38aa4a7 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Restore Q_PROPERTY macrosUlf Hermann2016-07-083-0/+34
| | | | | | | | | | | | This is still almost for free, and vastly easier to do than a solution with plugins.qmltypes. The plugins.qmltypes format is tailored for actual plugins, identifyable by a fixed URL. However, in the workflow we suggest right now, the URL is controlled by the user. Resolving it from the code would require the same guesswork as we have to do to resolve Q_PROPERTY macros from the headers. Change-Id: Iec916e7e91de096a38b61e6b76794b3dca3139d5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Replace the QStateMachine-based implementation.Erik Verbruggen2016-06-098-1316/+960
| | | | | | | | | | | | Under the 'hood a table-based state machine is now used instead of the QStateMachine. The advantage is that states and transitions are no longer QObjects but integers (so no (private) object allocations), and we're no longer hijacking the QStateMachinePrivate to work around some implementation details. Change-Id: I47ab47ab01cbb2204b9ca0e4cdd6a72faf724ce3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Implement srcexpr in <invoke>Jarek Kobus2016-06-071-0/+3
| | | | | Change-Id: I572342eb4952a6a0777a7503d374da6536ba052d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove old, obsolete, dead codeJarek Kobus2016-04-191-31/+0
| | | | | Change-Id: I384cafc47b43cdc96d02cd98179503150af35758 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow history states for <scxml>'s "initial" attributeUlf Hermann2016-04-191-3/+3
| | | | | | | | The standard doesn't seem to prohibit this and QStateMachine can handle it. Change-Id: Ia22f564c9657582199c3c67318fafd21ec4a8770 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Don't mangle service namesUlf Hermann2016-04-181-2/+2
| | | | | | | We want to look the services up by their original name later. Change-Id: I8a8061bccb064a779e50aefdc6cf348806b417cd Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Don't generate calls to setInitialState for parallel statesJarek Kobus2016-04-161-5/+7
| | | | | | | ScxmlVerifier also doesn't allow for it. Change-Id: I303bd6b81b4690acc2e7a2379e07b703e32a7a06 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Detect clashes in event and state namesJarek Kobus2016-04-141-10/+7
| | | | | Change-Id: I6df9f73965442b7866c8912ac8a0a0858640bb62 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Validate IDs and event names, and handle them well in C++ generation.Erik Verbruggen2016-04-133-74/+154
| | | | | | Change-Id: I2e4e15496e7b2adc2f452745b1341f8fa0140b12 Task-number: QTBUG-51818 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Write generated string literals as array of numbersUlf Hermann2016-04-132-53/+24
| | | | | | | | | Having UTF-8 literals in source code is notoriously brittle, as compilers interpret them differently. Let's just write every byte or qunicodechar as a number. That should remove any ambguity. Change-Id: I3d79c7f15dc58a3b74b3a79e9186a612d38cb5a5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use common .pri file for building qscxmlc and its testJarek Kobus2016-04-122-32/+36
| | | | | | | | That way we ensure we really compile it in the same way. This e.g. defines BUILD_QSCXMLC while building the test. Change-Id: Iffe0e9f1d3cbd543bb69049bb889226212ea49a8 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Don't include source file in tests/auto/qscxmlcJarek Kobus2016-04-124-9/+103
| | | | | Change-Id: I920128e27605487e68c72e2f59e1e53144621816 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>