summaryrefslogtreecommitdiffstats
path: root/src/scxml/qscxmlcppdatamodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Replace unusable \Q_OBJECT macro in documentationKai Köhne2024-11-191-8/+4
| | | | | | | | | | | | | | | | | | | moc/AUTOMOC will detect Q_OBJECT macros in code, regardless of whether it is in a comment or not. This is why originally a qdoc macro Q_OBJECT was introduced. Anyhow, due to the underscore, qdoc never did treat \Q_OBJECT as a macro invocation of this, resulting in \Q_OBJECT being verbally printed in the generated documentation. Fix this by moving the snippet into it's own file. This also allows compile-testing it as a bonus point. Task-number: QTBUG-130799 Pick-to: 6.8 Change-Id: I7b737ec06dc9eb58d5cacb218f039dcc8b871ef8 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Adjust the example namesJuha Vuolle2023-02-231-1/+1
| | | | | | | | | | | According to current example conventions in https://wiki.qt.io/Qt6/Example-Guideline#Naming_the_example Pick-to: 6.5 Task-number: QTBUG-111323 Change-Id: Ib7f13bd1a147168c6df13b126daac4bf1daf405d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove other than "cpp model" mediaplayer example variantsJuha Vuolle2023-02-231-1/+1
| | | | | | | | | | | | | | The most unique aspect the mediaplayer demonstrates is the use of cpp data model. This commit removes the other variants and renames the remaining one as plain "mediaplayer". The two QML files (one from common and one from the original cpp-model example) were united as one, as there is now just one example. Task-number: QTBUG-111090 Pick-to: 6.5 Change-Id: I450ce5b23df072be34dcbc3c109d10e6b45709da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-141-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ic435d3a484be01542f27431068419a2c252bd1f6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Qt6 related documentation changes for scxml moduleJuha Vuolle2021-02-111-2/+4
| | | | | | | | | | | | | | | | | | | 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>
* Port QtScxml to CMakeJoerg Bornemann2019-09-261-2/+2
| | | | | | Change-Id: I227f18b6a9825b6974eab6ba9feaf62bd0934133 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Edit the docs for grammar and styleLeena Miettinen2016-12-021-8/+8
| | | | | | | 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-301-15/+52
| | | | | | | | | 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 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 some empty destructorsUlf Hermann2016-11-291-5/+0
| | | | | | | | We don't need to expose explicit destructors when inheriting from QObject. Change-Id: I2c9e7b075cab9b8b44be10045aeddd3c1cfb89b7 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-251-2/+1
| | | | | | | | | 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>
* Get rid of qt modeJarek Kobus2016-08-231-1/+1
| | | | | Change-Id: Id8cc29a9a27f571f063b1cec51e534a3c762f2c6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rename "In" method to lowercase "inState"Ulf Hermann2016-08-041-1/+1
| | | | | | | ... to follow the coding style. Change-Id: I24b0bfa0d7b2ca7be160c88b3aa6cafe88637dd2 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Don't bind NULL events to _event variable.Jarek Kobus2016-05-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* De-inline QScxmlDataModel hierarchy dtorsMarc Mutz2016-05-121-0/+5
| | | | | | | | | | | | | | | | 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>
* Drop the stateMachine parameter from data model constructorsUlf Hermann2016-03-301-3/+3
| | | | | | | | | | 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>
* Make data models QObjects, and rename some members to avoid clashesUlf Hermann2016-03-301-18/+11
| | | | | | | | | | We will have one data model per state machine, so the overhead of creating a QObject won't be significant. However, we can expose the data model to QML this way. Also, by using QObjectPrivate, we can actually drop a few d-pointers. Change-Id: I8a73dde017e8fd38032f4948e2946590456b4cc9 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Unify Qt namespace declarationsUlf Hermann2016-03-301-1/+3
| | | | | | | | | 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>
* Doc: add direct links to SCXML Specification sectionsLeena Miettinen2016-03-171-2/+2
| | | | | | | ...instead of always linking to the top level Change-Id: I967b50ebce2038b09bb911c617e1bd431e5a13c7 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Doc: corrections according to the current API state.Jarek Kobus2016-03-031-6/+2
| | | | | | Change-Id: Id38eb2b75e5205b74238151b20a279ba71442713 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* qtscxml is first relased as part of Qt 5.7Alex Blasche2016-02-111-1/+1
| | | | | | | The various \since tags should reflect that. Change-Id: Ic392ffb18767e723072e24428302e8f602eb20a0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Doc: Edit QScxmlCppDataModel docsLeena Miettinen2016-02-091-39/+31
| | | | | | | | | | | | | | - Fix grammar issues - Use QDoc commands for formatting elements and attributes - Remove \brief commands for function documentation - Remove \param commands - Replace \return commands with "Returns..." - Replace \internal commands with \reimp for reimplemented functions - Remove \internal commands for functions marked with #ifndef Q_QDOC in the header file Change-Id: I74172cccccddf74d9495338b89162d00d3940ace Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Update license headersJarek Kobus2016-01-261-9/+27
| | | | | Change-Id: If100cc6cfeccc9ec4f13e03d69edfb7fad6bc2f6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove QScxmlStateMachine::setDataModel.Erik Verbruggen2015-12-031-2/+3
| | | | | | | The data-model constructor will now do the work. Change-Id: I32dfaf95b39a4e9dcd0b6f3598fe89fdf150c909 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Added more documentation.Erik Verbruggen2015-12-011-2/+2
| | | | | Change-Id: I015efef78b9c9a0b08ccffa2c2802870769deacd Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Clean up the state-machine initialization.Erik Verbruggen2015-12-011-1/+3
| | | | | Change-Id: I52d989c8a387faf5894f7dbb526984648b83c7a3 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix licenses.Erik Verbruggen2015-11-171-17/+29
| | | | | Change-Id: I7a520a55c92114dbb4d0a553bb9e0ebf610b095e Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Doc: standardized spelling of state machineNico Vertriest2015-11-131-3/+3
| | | | | | | state-machine --> state machine Change-Id: Ia32d1acb6cbc5584c468a2b0d7b732bc871b8272 Reviewed-by: Martin Smith <martin.smith@digia.com>
* More documentation for QScxmlCppDataModel.Erik Verbruggen2015-11-121-4/+30
| | | | | Change-Id: I08b5becc64495dd0865f2158877f7a7ff8dc6a17 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* More docs again.Erik Verbruggen2015-10-301-0/+6
| | | | | Change-Id: Ibdb1dd88969162046fb7519fb32093b5f67aaea6 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* More documentation.Erik Verbruggen2015-10-301-0/+33
| | | | | Change-Id: I79a4776902313cee2429532c755b2badc4badd7e Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix Q_SCXML_DATAMODEL macro.Erik Verbruggen2015-10-291-0/+2
| | | | | Change-Id: I319fda8e4109645526be6eec7e9ddf177b433273 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* More documentation.Erik Verbruggen2015-10-291-6/+56
| | | | | Change-Id: I542a6ae7cd2b8616e18e9590690a654723a9458d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Get documentation generation working.Erik Verbruggen2015-10-281-0/+9
| | | | | Change-Id: I71356ec70d79fec51670fa9ee53541f263e12206 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Renamed files to (hopefully) match Qt naming.Erik Verbruggen2015-09-171-0/+97
Change-Id: Iaaebe835a6bdcfe934af10090b51973c10f38a90 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>