summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix examples install path for Qt Creatorv5.7.0Leena Miettinen2016-06-011-1/+1
| | | | | | | | Without this change, Qt Creator tags the examples as "broken". Change-Id: I42e73b967198a3f3a3da7fb6530f3041cbcb23fe Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Doc: Highlight some examples in Qt CreatorLeena Miettinen2016-06-011-0/+3
| | | | | | | | This is a new module and some of the examples look nice. Change-Id: Ifadf559325ed95c3b9b0e075da2d5f79cf238203 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* fix example installsv5.7.0-rc1Oswald Buddenhagen2016-05-253-3/+3
| | | | | Change-Id: Ibc3f26030cf925f1f8796ff5a12fb92e4d861a39 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move scxml files into data subfolder, add more testsJarek Kobus2016-05-2010-12/+97
| | | | | Change-Id: I56bcc107c6df43ccc91822cd77b753190125e906 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Enable more testJarek Kobus2016-05-202-27/+3
| | | | | Change-Id: I57e9a9d8a38837c9939b6de8602ce1e86e8df1a8 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Don't bind NULL events to _event variable.Jarek Kobus2016-05-203-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes test329. According to scxml documentation: "NULL has no name and is used only in these definitions. It never occurs in the event queues of an SCXML Processor". "In the case of <transition> elements that do not contain an 'event' attribute [...], the _event variable will not have a easily predictable value since the transition is not being driven by an event. In these cases, _event will be bound to the last event that was matched against a transition." Analysis of test329: We enter the s1 state, raise event "foo" (which binds the _event variable into "foo" event) and transition into s2 state. When entering s2 we assign the _event variable (which is still bound to "foo") to the Var2. Next, we select eventless transitions for s2. In current implementation, selecting eventless transitions bind _event variable to the empty event. Now we omit it, according to docs. Change-Id: Ib393d4465f9a3ff4afc152aee2c334a80ee5fe66 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix posting delayed events in scion playlistsJarek Kobus2016-05-201-9/+3
| | | | | | | | | Instead of posting a delayed event directly we wait desired time and post an event without delay. Change-Id: Ibe4dd866c412458d361de9f3e67898aa06ec4a6c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Refactor parser, parse recursively nowJarek Kobus2016-05-206-635/+1078
| | | | | | | | | | | Splits the parsering function into several smaller functions per element kind. Fixes parsing of 11 scion tests. Fixes parsing of non-terminated comment inside <script> element. Change-Id: I1d82c3164415a71e69e90bc6d3b96bda67dabb6c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Doc: Fix typo: relased > releasedLeena Miettinen2016-05-201-1/+1
| | | | | Change-Id: I9cc9dd339120acc6989b03731ed7f8dceb2c3654 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add change log for Qt 5.7.0Leena Miettinen2016-05-201-0/+24
| | | | | Change-Id: I899b2388d81c7920f6d8c8b0311809ea5dd9e5ed Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Doc: Add information to the OverviewLeena Miettinen2016-05-191-2/+78
| | | | | Change-Id: Icd445aa69747603a38397f6399208859df765aee Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Doc: Add docs for QScxmlStateMachine::externalEventOccurredLeena Miettinen2016-05-191-1/+14
| | | | | Change-Id: I2334c9ad9ba01b9d23b7bea973e0f36d37a522b0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Add a test checking dynamic meta object content of the state machineJarek Kobus2016-05-186-1/+305
| | | | | Change-Id: I4754fc96d34723bd849ff72c4c746f5dee4b1362 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Edit Pinball example docsLeena Miettinen2016-05-178-296/+256
| | | | | | | | | | - Edit for grammar and style. - Add state chart images to improve readability. - Add subtitles to improve readability. Change-Id: I1429adf098e868388489f361caa5265b32c33a45 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Improve QtScxml module conformity to other Qt modulesAlex Blasche2016-05-1711-13/+18
| | | | | | | | | | The other QML modules use a versioning based on the Qt modules version. In addition the QML plugin name is always libdeclarative_<module_name>.so. Therefore the target for the QML project has to be adjusted accordingly. Change-Id: I218836bc01a7cb4ab8d8c3edde1d3d6deeaffd75 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix cmake test caseUlf Hermann2016-05-172-5/+2
| | | | | | | | | | | QtQuick or QML are not required, but scxml is. Also, we should check for a real class to verify the module is there. Task-number: QTBUG-51420 Change-Id: Ic6b6086bfba318933139f4bfd04826980c3716d4 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix compilationSimon Hausmann2016-05-171-0/+2
| | | | | | | | Commit 4dc29bc9de1da1d373962dbd4b1d232f38ffeee0 in qtbase removed the implicit inclusion of qmap.h and qvariant.h through the removal of #include qdebug.h. Change-Id: I8de52f50af2508cbd1f90caf4e8883746c57b330 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* De-inline QScxmlDataModel hierarchy dtorsMarc Mutz2016-05-128-0/+24
| | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info strucures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. Since they are already exported, users of the classes are unaffected by the change. Task-number: QTBUG-45582 Change-Id: Ie4336b592f7e1f4f25fd87b95289efc9d10e5553 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add explicit and make public headers compile with ↵Marc Mutz2016-05-124-5/+5
| | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant (take 2) ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Change-Id: Iae024c4aa307bc891e244f7a8041846cef747ca4 Task-number: QTBUG-45291 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* scxml parser: fix compilation with GCC 6Marc Mutz2016-05-121-1/+1
| | | | | | | | | | | | | | | Says GCC 6: src/scxml/qscxmlparser.cpp:394:103: error: ‘visibility’ attribute ignored [-Werror=attributes] Q_DECL_HIDDEN static void qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) ^ Just drop the attribute. The class in which this function is defined is not exported, anyway. (backport of 51f90f9f6ed627fe013232e20babdeee58d00267 from dev) Change-Id: I7826306adf9e2bc5c25eeafc328a9b38e902fc61 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Cleanup and rename QML scxmlstatemachine pluginAlex Blasche2016-05-1211-16/+17
| | | | | | | | | The Qt modules use the Qt prefix and the project file should rely on qmake's qml_plugin logic. Change-Id: I9a13109d6307679c1e7362680eaf9c33e2bdda3b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix valid children according to scxml specificationJarek Kobus2016-05-041-2/+3
| | | | | Change-Id: I99c4fd6b25739e8cec725ea94b4fe7752e903aa2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Set the event type of done.state events to internal.Erik Verbruggen2016-05-035-0/+80
| | | | | Change-Id: If874a2aa4a47ea1ebe2dd539c09ff19243dd5558 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Add qmltypes file to QtScxml typesAlex Blasche2016-05-031-0/+21
| | | | | Change-Id: I91bba11ec274b1f1ca68aeab1514a5ef055ad5f6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove dead codeJarek Kobus2016-05-021-4/+0
| | | | | | | | This condition won't be hit since we did "skipCurrentElement" and continued in this case on the beginning of QXmlStreamReader::StartElement Change-Id: I002d4215adad7f237d57f8c93eb1de7881f095ad Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't leak m_doc->root when nested <scxml> occurred.Jarek Kobus2016-05-023-2/+10
| | | | | Change-Id: I77463e007bc2d4c1ece6c4341026968e6fe10793 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix the event's debugString().Erik Verbruggen2016-04-281-7/+14
| | | | | Change-Id: I08a066bcb5ba0b52fe9960294826d5ac2a580b63 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compiler warning.Erik Verbruggen2016-04-191-1/+1
| | | | | | | | | /Users/erik/dev/qt5-stable/qtscxml/src/scxml/qscxmlnulldatamodel.cpp:108:16: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] return qMove(resolved); ^ Change-Id: I616056bacb5142726eaba6ed3e5877927fb75019 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove old, obsolete, dead codeJarek Kobus2016-04-193-57/+0
| | | | | Change-Id: I384cafc47b43cdc96d02cd98179503150af35758 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow history states for <scxml>'s "initial" attributeUlf Hermann2016-04-196-5/+60
| | | | | | | | 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-182-2/+13
| | | | | | | 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 crash when trying to execute things in the null data modelUlf Hermann2016-04-184-11/+37
| | | | | | | | Rather raise error.execution, as mandated by the standard (in most of those cases). Change-Id: If2e200693198b70b4bf067011318f0d78c44653b 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>
* Remove redundant m_currentParent, it's the same as m_currentStateJarek Kobus2016-04-162-23/+20
| | | | | Change-Id: I2e527519f783184b81f83ab124acfea7b6b8a65c Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Refactor checkAttributes, remove unused code.Jarek Kobus2016-04-162-64/+123
| | | | | Change-Id: I1030600e7cdb128ea088fa8ad736317dbd1fc2ac Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Reduce repeating code, remove unused ParserState::DataElementJarek Kobus2016-04-162-90/+90
| | | | | Change-Id: I3114e03e942b2913deb5bb121d8a15e906b4463f Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Give more descriptive names to test casesUlf Hermann2016-04-1535-34/+34
| | | | | Change-Id: I0f1929bf592206ad3a6164a50d9d933a6096741d Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Don't crash on misplaced <invoke>Ulf Hermann2016-04-143-2/+29
| | | | | Change-Id: I052261ef64ae4ada5c93211c61718cd81e4f0dd7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Detect clashes in event and state namesJarek Kobus2016-04-146-156/+380
| | | | | 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-1324-84/+759
| | | | | | 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>
* Add externalEventOccurred() signal.v5.7.0-beta1Jarek Kobus2016-04-125-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This signal is emitted only for events sent from SCXML file which are of qt:signal type. Reasoning: I want to use state names which contain dots, e.g. "Letter.A", "Letter.B", etc. The reason for that is I may listen to "done.state.Letter.*" event, which will be generated automatically whenever one of Letter.* went to its final state. Unfortunately, I cannot use qt-mode in that case, since dots in state names are not allowed in qt-mode. I'm forced to use non-qt-mode. In the same document I send external signals with <send type="qt:signal">. In order to listen to these signals I need to connect to the generic eventOccurred() signal in cpp code, since there is no other way in non-qt-mode. However, when I'm connected to eventOccurred() my slot is being invoked for every internal event, which slows down the execution. Practically, I'm not interested in internal events at all, but only for those marked with type="qt:signal". That's why this patch provides additional generic signal for "qt:signal" only event. Change-Id: Ic9206e98a20f72142f5584e0568f9f33d56f8e97 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Use common .pri file for building qscxmlc and its testJarek Kobus2016-04-123-45/+39
| | | | | | | | 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-126-14/+106
| | | | | Change-Id: I920128e27605487e68c72e2f59e1e53144621816 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* fix prefix buildsOswald Buddenhagen2016-04-082-10/+6
| | | | | | | | rely on qtPrepareTool() for qscxmlc setup. Task-number: QTBUG-51151 Change-Id: I8f8380dcb8519a7786d8fb5b50594c2fe3dff93b 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>
* Adjust style of calculator exampleUlf Hermann2016-04-062-3/+15
| | | | | | | Change-Id: If3dfab3d0ec1faaa7cbeb5d4da34a24f6da288c7 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Diana de Sousa <diana.desousa@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Pass an arg through const &Jarek Kobus2016-04-061-1/+1
| | | | | Change-Id: Ib6294916c57f79b1f28bec5c15f2a3c13291ef8b Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Add a test for done.state eventJarek Kobus2016-04-062-0/+47
| | | | | Change-Id: Ie8c9c0caaf5530a9d0c63d74e4f520a20af115c3 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>