summaryrefslogtreecommitdiffstats
path: root/tools/qscxmlc
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Make sure the output files are proper UTF-8Ulf Hermann2016-04-071-1/+14
| | | | | | | | | | Making the text codec explicit saves us from surprises on systems where the system text codec is something else. MSVC only considers source files as UTF-8 if they contain a byte order mark (BOM). As we write UTF-8, we should also generate BOMs then. Change-Id: Id2cc35ed4fb9e37bc567db09e18fb71ac4ce54b0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Pass an arg through const &Jarek Kobus2016-04-061-1/+1
| | | | | Change-Id: Ib6294916c57f79b1f28bec5c15f2a3c13291ef8b Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Use C escaping instead of hex encoding for generated metadataUlf Hermann2016-04-051-17/+3
| | | | | | | | | Hex-encoding characters above 0xff is hard to do in a cross-platform way. However, using C++11, we should be able to get portable wide character literals. Change-Id: I9b4faa7f443c00b43c8f15e5d1411b2d82609623 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Use a plain QIODevice for dumping the C++Ulf Hermann2016-04-053-12/+17
| | | | | | | All the strings are converted to byte arrays already before. Change-Id: Ibdd565e0560fe97ff9347f8153a03cd60c21a508 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* C++ dumper: flush streams before closing device.Erik Verbruggen2016-04-011-0/+2
| | | | | | | They might still hold some data that's not yet written to the device. Change-Id: I7826437007640a011154b470951b96d58e716f76 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Add an (initially empty) test for qscxmlcUlf Hermann2016-04-011-15/+15
| | | | | Change-Id: I68b78d2a186ea88d9aa5ff243d441b9890693a79 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Add missing va_endFrederik Gladhorn2016-04-011-0/+1
| | | | | Change-Id: Id86be4650d8c8fea6f96c8f1412564a7fc7084be Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Drop the stateMachine parameter from data model constructorsUlf Hermann2016-03-301-2/+2
| | | | | | | | | | Instead, make the data model a Q_PROPERTY of state machines. This makes it much easier to independently instantiate state machines and data models from QML and connect them via properties. Change-Id: I62d712dd0ad7817c39432204ced431b8041e442d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Unify Qt namespace declarationsUlf Hermann2016-03-301-0/+6
| | | | | | | | | Use QT_{BEGIN|END}_NAMESPACE instead of QT_USE_NAMESPACE as that puts any additional symbols into the Qt namespace rather than polluting the outer namespace. Also, add declarations where they were missing. Change-Id: I29a308ca62497ee613feca7355aa819be4fb6f51 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Handle parantheses and commas in state namesUlf Hermann2016-03-221-6/+12
| | | | | | | | We cannot generate Q_PROPERTY macros in those cases and we need to escape them to generate C++ identifiers. Change-Id: Ie4a35996786817819b7b2520ef060187ef8592bb Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Restore Q_PROPERTY macros for states in generated headersUlf Hermann2016-03-221-2/+7
| | | | | | | The macros are almost for free and improve tooling support. Change-Id: Iddf4bcd69373633b667a56237e1b7c8433e08bfd Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Rename qscxmlc optionsJarek Kobus2016-03-071-4/+3
| | | | | Change-Id: I6014b117424779f51f28710b6df5635e41d22fae Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Add an qt-mode option to qscxmlcJarek Kobus2016-03-071-1/+25
| | | | | | | | This will be useful to generate scion tests in qt mode to check if the generated files still compile. Change-Id: I295a24e39752acc100dc983104e70eb4e4938940 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Use QCommandLineParser inside qscxmlcJarek Kobus2016-02-181-47/+74
| | | | | Change-Id: Ia897e1e1b60ef243fc65cc2db312083aba5f66e6 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Add version info to qscxmlcJarek Kobus2016-02-182-6/+8
| | | | | Change-Id: I9aa5d010c9e0245f3f5c9a604089e4556c76e9ea Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Add a version check & edit disclaimer to generated files.Erik Verbruggen2016-02-053-0/+32
| | | | | | | | | | | | The version check is to make sure that the generated .cpp/.h files are compiled against the same version of the module as the generator. The disclaimer is to tell users that the .cpp/.h files are generated and not intented to be edited. Change-Id: I394311b7995ea6e502f1c65e0e11d130487bce0e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Change staticMetaObject generation.Erik Verbruggen2016-02-057-43/+2284
| | | | | | | | | The full meta-object generation is replaced with the moc generator. This gives a fully functional meta-object without any overhead during object instantiation. Change-Id: Ibf62a6f1bfc0873cd00dd2e4bbad38c8d165005a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Remove event_ prefix from event signals and slots.Erik Verbruggen2016-02-041-21/+28
| | | | | | | | Also only generate the C++ declarations and definitions when in "qt mode". Change-Id: I799ce3efe23e046d26180d1a6e690755523dbed1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update license headersJarek Kobus2016-01-264-36/+63
| | | | | Change-Id: If100cc6cfeccc9ec4f13e03d69edfb7fad6bc2f6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove QScxmlStateMachine::setDataModel.Erik Verbruggen2015-12-031-3/+5
| | | | | | | The data-model constructor will now do the work. Change-Id: I32dfaf95b39a4e9dcd0b6f3598fe89fdf150c909 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Change QScxmlEvent::{name,sendId} from QByteArray to QString.Erik Verbruggen2015-12-031-61/+2
| | | | | Change-Id: I1da62c00865b955864df0326a247bafba6c763ff Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Fixed some fixes.Erik Verbruggen2015-11-191-0/+2
| | | | | Change-Id: I9681d58857de9602b13f3a30fe3575a3495a9caf Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix cross-compilation.Erik Verbruggen2015-11-182-2/+19
| | | | | Change-Id: I56d706921c9e8048a17d0199c3dbcf406c3ef79c Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* More license fixes.Erik Verbruggen2015-11-171-17/+20
| | | | | Change-Id: Ie048b867b34a05f23b491c4149fc5e1cd0dbe67b Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix licenses.Erik Verbruggen2015-11-173-51/+60
| | | | | Change-Id: I7a520a55c92114dbb4d0a553bb9e0ebf610b095e Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Doc: standardized spelling of state machineNico Vertriest2015-11-131-1/+1
| | | | | | | state-machine --> state machine Change-Id: Ia32d1acb6cbc5584c468a2b0d7b732bc871b8272 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Add cmdline options docs for qscxmlc.Erik Verbruggen2015-11-121-5/+8
| | | | | Change-Id: I6a45d1983eac090ce0371a7f3176947eb424857f Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Doc: Add documentation for the Qt SCXML compilerTopi Reinio2015-11-101-0/+77
| | | | | | | | | | | Add a dedicated page for the qscxmlc tool, and link to it from the landing page. Descriptions for the command-line options and possibly other information still needs to be added. Change-Id: Idff444a652d3c50205be9f73af0f112f88d0969d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Work around a bug in GCC.Erik Verbruggen2015-10-291-10/+9
| | | | | | | auto + QStringBuilder == std::bad_alloc. Change-Id: Ie2e88864238daae5c06d8e2deb3b93c76c65e009 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix building with MSVC2012.Erik Verbruggen2015-10-281-29/+31
| | | | | | | No initializer lists.... Change-Id: I3a86992cd7412cde9967d57d9ad68d7f6424c404 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Compile fix for linuxJarek Kobus2015-10-061-0/+1
| | | | | | | Add missing #include <functional> for usages of std::function. Change-Id: I92f13406eb629a98a950d48618c54ae19f682092 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Add properties for nested state machines.Erik Verbruggen2015-10-063-39/+126
| | | | | Change-Id: I80893af6755ca9b731c0701a38b55b8596f84f94 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Split qscxmlstatemachine.h into separate files.Erik Verbruggen2015-10-061-2/+4
| | | | | Change-Id: Ie3137be6a02007510f2d7627dd378d7e8d0477c4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Cleanup: enamed all "table" variables to "stateMachine".Erik Verbruggen2015-10-061-1/+1
| | | | | Change-Id: I458da16ba900864d785eae97c0bc8ada890fd4ab Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Various build fixes.Erik Verbruggen2015-10-061-1/+3
| | | | | Change-Id: I12e9055e2c76db300a3343f34387a28a59874253 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Compile fixes against 5.5Risto Avila2015-09-251-1/+1
| | | | | Change-Id: Iaa86fd7f27c082199d10633685a55d8b1d27171f Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Renamed files to (hopefully) match Qt naming.Erik Verbruggen2015-09-173-11/+10
| | | | | Change-Id: Iaaebe835a6bdcfe934af10090b51973c10f38a90 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Nuked the Scxml namespace.Erik Verbruggen2015-09-173-48/+41
| | | | | | | We're now just like Qt. Change-Id: I34a20b19436e0a8626436e9727cadb865f124517 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Renamed StateMachine to QScxmlStateMachine.Erik Verbruggen2015-09-171-4/+4
| | | | | Change-Id: I73c6ff52478383c3c3870e0a889194444c956a4b Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Renamed TableData to QScxmlTableData and ScxmlError to QScxmlError.Erik Verbruggen2015-09-172-3/+3
| | | | | Change-Id: I47fce45d787402f615ae200ef60f9226e367e448 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>