summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add a way to verify events received from a test caseUlf Hermann2017-02-081-0/+103
| | | | | | | | | | Change-Id: I1012cb5c1b38c23af32197c48459668dc64144b2 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Reformat include statements in accordance with coding conventionsUlf Hermann2017-02-0818-57/+49
| | | | | | | | | | | | | | | | | | Also, drop the QStateMachine includes. We certainly don't need them anymore. Change-Id: I1fe99162c68668858024516f937ee66ca6eff0bc Task-number: QTBUG-58658 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Fix incorrect include of QStringMilla Pohjanheimo2017-02-081-1/+1
| | | | | | | | | | | | | | | | In public header files including Qt headers should be #include <QtCore/qwhatever.h> Change-Id: I4fb76e04a2bb2ed99e81fa41be1c03f14a047e16 Reviewed-by: Erik Verbruggen <erik.verbruggen@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>
| * Evaluate expr in <content> to variant, rather than stringUlf Hermann2017-02-071-1/+1
| | | | | | | | | | | | | | | | There is no reason to artificially clamp the range of possible data types as the data() member of QScxmlEvent is QVariant. Change-Id: I9264a61566c60bbf1325f3864064a093dc02edbd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Fix example to use source instead of filenameAndy Shaw2017-01-311-1/+1
| | | | | | | | | | | | Change-Id: I8ef23c1e79dbec48522fcbe78700176a06b02678 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Doc: Mention that the state machine owns submitted eventsUlf Hermann2017-03-061-0/+1
| | | | | | | | | | Change-Id: I9e83c938ff6ebc3c630b2d28f6d3c00cc340b291 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Make QScxmlScxmlService::stateMachine a Q_PROPERTYUlf Hermann2017-02-245-13/+117
| | | | | | | | | | | | | | | | Without this, the invoke example doesn't work. Change-Id: I8c4ae9b21e1164946f2a60777b9e9905f2b51237 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Register a metatype for QScxmlStateMachine *Ulf Hermann2017-02-241-1/+4
| | | | | | | | | | | | | | | | | | We want to be able to pass it through QVariant without manually registering it. Change-Id: I99a39a168f4b4620b91f184f13ad744172d89d1e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devv5.9.0-alpha1Liang Qi2017-01-2535-394/+968
|\| | | | | | | | | | | | | 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-0431-374/+960
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/scxml/qscxmlinvokableservice.cpp tools/qscxmlc/scxmlcppdumper.cpp Change-Id: Iadbe84d8eae7ccdf8dd9a0109af236a3747976c8
| | * Initialize the scxml element's initial transitionv5.8.0-rc1v5.8.0Ulf Hermann2016-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents TableDataBuilder::visit() from asserting when an empty state chart is processed. Task-number: QTBUG-57499 Change-Id: If5ca4f68101ff72548d43e4c84c02c84b9803017 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Emit runningChanged signal when running changesJan Arne Petersen2016-12-082-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | The QScxmlStateMachine::runningChanged signal was never emitted. Emit it when the running property changes. Change-Id: I9b6cb8d48c9c8d893b0af2b8f87ecd74f4e64055 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
| | * Doc: Edit the docs for grammar and styleLeena Miettinen2016-12-028-105/+117
| | | | | | | | | | | | | | | | | | | | | Fix an external link and add \brief commands for properties. Change-Id: I84477f0cfddb27bbb4d807f8f1b000601af245c9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Add missing documentationUlf Hermann2016-11-3014-50/+602
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the methods marked as \internal or excluded via "#ifndef Q_QDOC" so far are not actually internal as they are called from compiled state machines. We have to document them. Change-Id: Ib80268ae00f536e9ac2d337b565dcafbbdc31dea Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Drop indirect access to tableData from various data modelsUlf Hermann2016-11-306-65/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we need to access it from everywhere, we can as well make it a public property of the state machine. This saves us the tableData() method on QScxmlDataModel and some back and forth between d and q pointers. We can also drop the indirection for accessing the state machine in most cases, as that is just a public member of QScxmlDataModelPrivate. Change-Id: I4aa0cec7d4664aec7b1581de531cdb1554ca5342 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Drop the final from methods of QScxmlCppDataModelUlf Hermann2016-11-301-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to prohibit the implementation of <assign>, <foreach> and initialization. That will just make people resort to the base class instead of using the facilities offered by the C++ data model. Change-Id: Ic2c8d679a2c8f1c592cb3075c0b70c7cff80cd9c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Drop Q_UNREACHABLE() from C++ data model methodsUlf Hermann2016-11-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not illegal to do e.g. <assign> in your SCXML document without implementing the assign operation in your data model. The assignment will fail, setting the ok parameter to false. That should be enough. Q_UNREACHABLE() is unreliable anyway as it only triggers in debug builds. Change-Id: Ib29a20682d2c9256fcf59d29e32383c1df675eba Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Drop empty QScxmlEcmaScriptDataModel destructorUlf Hermann2016-11-302-6/+0
| | | | | | | | | | | | | | | Change-Id: I6d7f4ef2215e8fe0b0547b71130a684139d55c0b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Fix header guardsUlf Hermann2016-11-2915-45/+45
| | | | | | | | | | | | | | | | | | | | | 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-2910-63/+125
| | |\ | | | | | | | | | | | | Change-Id: I8fa59d8b2559aa620eb533ed4274ea1b7374d2c7
| | * | Drop some empty destructorsUlf Hermann2016-11-294-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to expose explicit destructors when inheriting from QObject. Change-Id: I2c9e7b075cab9b8b44be10045aeddd3c1cfb89b7 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * | Reduce the public API exposed in qscxmlinvokableservice.hUlf Hermann2016-11-297-158/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Pass the factory to QScxmlInvokableService::start()Ulf Hermann2016-11-293-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of the various properties of the factory. This makes the API nicer. Change-Id: I16f3c6382d6cc71500147f8d2dbd35392924b5f0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * | Set ok to false in the evaluate stubs of the C++ data modelUlf Hermann2016-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If those get called, it's definitely an error. Change-Id: I0515e02ff77c2839bc4d31d35d266ecdfecb7624 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| | * | Drop the return value from QScxmlDataModel::evaluateForEach()Ulf Hermann2016-11-258-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an inconsistency in the public API. The bool return value is unnecessary as we pass a bool *ok, just like we do for the other evaluation methods. Change-Id: I750e5d6d39df417fec727ef6f3ec1ade5ddc2dfc Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * | | Bump versionOswald Buddenhagen2017-01-031-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ie002703be7e93308999fcdb793be45670beb7cbc
| * | | 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>
| * | | remove dependencies from sync.profileOswald Buddenhagen2016-12-271-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the CI obtains them from the qt5 super repo nowadays. Change-Id: I7bb10a858bb3f920139fb7cd9ac2134885e4878d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | | Resolve the mixup of various ID typesUlf Hermann2016-12-194-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not compare instances of different IDs with one another. Change-Id: I830d747ffde4c162c73475a600cef23e10c898e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | statemachineloader: Use the newly-introduced qmlWarning instead of qmlInfoRobin Burchell2017-01-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmlInfo will shortly be returning info-level messages (as the name hints), rather than warning level messages. While I'm here, tiny drive-by to remove the unnecessary "ERROR" prefixes on some of the warnings. Change-Id: Ia615e378f295893066ca437fa6cf5afb7213668e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Optionally generate accessor and signal methods for statesUlf Hermann2016-12-139-14/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-1211-64/+126
|\| | | | | | | | | | | | | | | Change-Id: I327045f701339ce2bf54b47a3a5ea9b08cdcc5f8
| * | | Fix include directive in qscxmlinvokableservice.hFriedemann Kleint2016-12-021-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | Fix syncqt warning: QtScxml: WARNING: qtscxml/src/scxml/qscxmlinvokableservice.h includes qscxmldatamodel.h when it should include QtScxml/qscxmldatamodel.h Change-Id: I5fb1f942aafc56a0fc96c00931e59c09b90df25f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-280-0/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/scxml/trafficlight-common/TrafficLight.qml tools/qscxmlc/doc/qscxmlc.qdoc tools/qscxmlc/scxmlcppdumper.cpp Change-Id: I1452fa6a24486fb33f70b49eff593a925894f8da
| | * | Do not accidentally generate <::5.7Ulf Hermann2016-11-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C/C++ uses <: as a digraph (for an opening bracket), so templateName<::namespaceName::className> would generate errors. (adapted from d7398f7f482d7a318d75f183758ee9bb37980b1a) Change-Id: I421c4cf5adf4934ababaef7cb38ba0f94bda49bd Task-number: QTBUG-53719 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * | Fix qscxmlc documentationChristian Kandeler2016-10-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Options use two hyphens rather than one. - The -oh and -ocpp options have been renamed. Change-Id: I4c41263ded3348a8bc43bb2a5813fb3b0d3bd90f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * | TrafficLight example: Use relative image file names in .qml examplesv5.7.1Alessandro Portale2016-08-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not just better practice to reduce the absolute source file names to a minimum, but in this case it also enables the Qt Quick Designer to properly display the scene. Change-Id: I0be935584687c5f5099619ffe9c0e356d0b4d56b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
| * | | Drop the --no-c++11 parameter from qscxmlcUlf Hermann2016-11-236-36/+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>
| * | | Add QScxmlStateMachineInfo::initialTransition()Kevin Funk2016-11-223-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add tests Change-Id: Ib94bd6c82129e77378caf2c53c3c8d443c6cc334 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Guard QScxmlStateMachineInfo::stateChildren()Kevin Funk2016-11-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we return something useful when querying the children of the root state. Add tests Change-Id: I39f41403dce6f67fc5aeb93cee98950368f7e14b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Add QScxmlStateMachineInfo::stateParent() + testsKevin Funk2016-11-223-0/+20
| | | | | | | | | | | | | | | | | | | | Change-Id: I3d97e1d4019c68859c9551e4a60d39348cf7ebe1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Distinguish invalid state/transition types from IDs and drop root stateUlf Hermann2016-11-223-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Types and IDs are conceptually different and shouldn't be mixed up this way. Also, as far as I can see, there is no real need to invent a synthetic root state. Leaving that out saves us a lot of inconsistency (e.g. the root state didn't show up in allStates(), and you couldn't ask it for stateChildren()). Without the root state some transitions originate from the invalid state, but that is an equally good characterization for initial transitions as the synthetic root state. Change-Id: I3738df08d0e3702433dabd3fb837f0ddaea57465 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * | | Add QScxmlStateMachineInfo::transitionEvents()Jan Arne Petersen2016-11-223-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add corresponding test for the new method. Change-Id: I09c4bb59df06bd33ae8a8667194d5f5d96765e2e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Add QScxmlStateMachineInfo::stateMachine()Kevin Funk2016-11-212-0/+9
| | |/ | |/| | | | | | | | | | Change-Id: I4d7ff4f8749af8e46b85aa00818ac9df563c0ff3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-2060-788/+2079
|\| | | | | | | | | | | Change-Id: Ifef2fbb8054bb1a6530802eb5997d62726a80bde
| * | Add CMake macros for statechart code generationKevin Funk2016-11-185-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce qt5_add_statecharts, used exactly like qt5_add_resources. Example usage: qt5_add_statecharts(MAIN_SRCS ../../compiled/connection.scxml ) Add tests Change-Id: If24ea872815e053582b0d7b8d89c4bbfb1162f88 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>