summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
Commit message (Collapse)AuthorAgeFilesLines
* Version transitionType as a new propertyAlan Alpert2015-06-111-1/+1
| | | | | | | | | It is exposed in the QtQml.StateMachine import, but note that the metaobject version is just incremented (no need to match QtQml.StateMachine, which is in a different module). Change-Id: I50773d9dec5252aa93846b7e5f743958ee838023 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QStateMachine: empty the whole internal queue before external queueErik Verbruggen2015-05-191-16/+10
| | | | | | | | | | If the internal queue contained multiple events, but the first one did not select any transitions, the external event queue would be checked before the remaining events in the internal queue. Change-Id: I1a7f49afdefaaf2b4330bf13b079b61344385ea0 Task-number: QTBUG-46059 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: fix RestorableId exception specificationMarc Mutz2015-05-191-1/+2
| | | | | | | | We're interested in whether qHash(QByteArray) throws, not declval<QByteArray>, of course. Change-Id: If3ba6e90aba69d0d4d12ac289e817f0d9705a601 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Reorder member variables to avoid padding.Volker Krause2015-05-142-2/+2
| | | | | | | Saves 8 byte in each case on 64bit systems, no change on 32bit systems. Change-Id: I2a2e8786fc7914ee9ae369ba05bedfc9e5e0ca5c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QStateMachine: allow posting of events when starting.Erik Verbruggen2015-05-072-2/+13
| | | | | | | | | | | This allows subclasses to submit any queued events that have to be handled before normal operation starts. For example, if an error event got generated during initialization which has to be handled by the state machine, the startup hook in the private class can be used to post those events and have the state machine handle them appropriately. Change-Id: I62249a31d8840f47bc19920870ad5da9647e61f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: Fix transition ordering.Erik Verbruggen2015-05-071-5/+32
| | | | | | | | | | | | When there are conflicting transitions, a transition that is nested deeper (i.e. more specific) has priority. If two transitions have the same nesting level, the one that comes first in the document order gets priority. Before this patch, only the document order was considered. Change-Id: I58f188c270cabe2c386a783ceef7a0a955105425 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* qstatemachine: add methods detect when a machine has processed an eventFawzi Mohamed2015-05-042-2/+52
| | | | | | | | | | | | | currently when adding an event it is not possible to know when processing it has finished. In particular if the event is ignored no method is called. Adding virtual methods to the private implementation (binary compatibility). These methods allow for extended automatic testing of the state machines. (cherry picked from commit e7feb956280105113b3e58f12e5f32f54199a95a) Change-Id: Iaa48fb9d7f6a6cde1a8a7a2bece7b4df55c147e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: add internal transitions.Erik Verbruggen2015-05-044-13/+69
| | | | | | | | | | | | | The behavior of "external" and "internal" transitions is identical, except in the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will. [ChangeLog][State machine] Added support for internal transitions. Change-Id: I9efb1e7368ee52aa2544eb84709a00ae3d5350d3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: cache expensive calculations.Erik Verbruggen2015-05-042-55/+205
| | | | | | | | | | | | | | | | | | As nothing changes in the state machine when selecting transitions for events and then calculating the exit- and entry-sets, some calculations can be cached. The exit set for a transition was calculated multiple times. First in removeConflictingTransitions, where the two loops would each calculate them multiple times. Then secondly in microstep(), which would calculate the exit set for all transitions. Transition selection, exit set calculation, and entry set calculation all calculate the transition domain and effective target states for transitions. Change-Id: I217328a73db2f71e371eb5f60a0c7b222303f0ca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: optimize conflict calculation.Erik Verbruggen2015-04-281-8/+22
| | | | | | | | Done by using in-place removal from the list of transitions using iterators. Change-Id: I6dced4b214b49b3dcd3ba19ca4cd81a601f81bb6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: replaced Q_FOREACH with foreach.Erik Verbruggen2015-04-221-16/+16
| | | | | Change-Id: I2bd0f9d7ef1d6f236e2afa9fc5b75c5a6f61a250 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignalMartin Smith2015-04-206-80/+16
| | | | | | | | | | | | Signals marked with QPrivateSignal had the QPrivateSignal marker ifdefed out for qdoc. This is no longer necessary, so the #ifdefs are removed. Change-Id: Idb334ed311c6ed6883d7b7b5a3fcdede60c4a1f8 Task-number: QTBUG-45535 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* QStateMachine: remove conflicting transitions after selection.Erik Verbruggen2015-04-102-67/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After selecting all (enabled) transitions for a microstep, filter out any conflicting transition. The actual conflict resulution is done by ordering the transitions in order of the states that selected them. For example: if an event would trigger two transitions in a parallel state where one would exit that state and the other would not, this filtering prevents the state machine from selecting both states (as this case is an invalid state of the whole machine). This also fixes the exit set calculation for parallel states when one of its substates is exited and subsequently re-entered in the same transition. Previously, the parallel state was not exited, and subsequent re-entry was ignored (because it was still active). Now it is correctly exited and re-entered. A side-effect of the transition ordering mentioned above is it also fixes the non-deterministic behavior of which of the conflicting transitions is taken. [ChangeLog][QtCore] Fixed an issue where the state machine could end up in an invalid state when transitions from a parallel state were not checked for conflicts. [ChangeLog][QtCore] Fixed a case where a parallel state was not exited and re-entered when one of its substates was exited and subsequently re-entered. [ChangeLog][QtCore] Fixed the non-deterministic behavior of picking a transition from a set of conflicting transitions. Task-number: QTBUG-44783 Change-Id: I2ee72b6a2f552077bfa7aa4d369474ab62f4c2f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* QStateMachine: fix history state restoration.Erik Verbruggen2015-04-102-45/+235
| | | | | | | | | | | | | | | | | | | | | | | When a history state is entered that has an actual saved history (so not the initial state), the entry set was calculated wrongly in some cases. See the bug report for the specific case. The fix is to fully implement the standard, so method names in the private class are updated to reflect the names as used in the standard. Note that, as mentioned in the bug report, the algorithm as described in http://www.w3.org/TR/2014/WD-scxml-20140529/ has a bug. What is implemented is the fixed algorithm as described in the current working draft as of Friday March 13, 2015. This draft can be found at: http://www.w3.org/Voice/2013/scxml-irp/SCXML.htm [ChangeLog][QtCore] Fixed an issue where a history state restore would activate too many states, possibly putting the state machine in an invalid state. Change-Id: Ibb5491b2fdcf3a167c223fa8c9c4aad302dbb795 Task-number: QTBUG-44963 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: move methods out of Private class.Erik Verbruggen2015-04-102-36/+54
| | | | | | | | Also rename them to match the names in the scxml standard, and add the relevant description from the standard to the methods. Change-Id: I495832358f5836ed6ea04bf43061d42e29f4f743 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: move QState::finished() emision into method.Erik Verbruggen2015-04-092-8/+20
| | | | | | | | | By moving the code for QState::finished() emission into a virtual method which also receives the QFinalState that caused the emission, subclasses can hook in and do some extra processing. Change-Id: Id19947c09e196a0df4edb87d71b74b0600c78867 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1124-168/+168
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-042-2/+3
| | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QStateMachine: replace a QHash key involving a QPointerMarc Mutz2015-01-092-4/+22
| | | | | | | | | | | | | | | | Using QPointers (or any type that makes a QPointer part of its identity) as a key in any associative container is wrong. They get externally set to nullptr, violating the associative container's class invariants, which could lead to data corruption, even though bucket-based hash implementations are less susceptible than binary trees. To fix, write a new class that acts much like the old QPair<QPointer<>,QByteArray>, but uses the QPointer only as a guard, not as part of its identity. To preseve identity, also saves the naked pointer originally passed and uses that for op== and qHash(). Change-Id: I4fa5a6bf86bad8fe7f5abe53d7c7f3ad3754d8d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStateMachine: fix some misleading codeMarc Mutz2015-01-091-3/+2
| | | | | | | | | | | | | | | | | | The old code creates a RestorableId from the passed (QObject*, QByteArray) and used it for lookup in a hash table (ok) and as a container for the (QObject*, QByteArray), satisfying later references to those parameters from the RestorableId instance instead of using the parameters directly. Now, RestorableId holds the QObject* in a QPointer, so the code might have wanted to detect the object being destroyed as part of the operation, BUT: a) the operation is a read-only one, and b) the code didn't check for nullness before dereferencing the QObject*. Fix by moving the creation of the RestorableId into the scope it's used and otherwise using the parameters directly. Change-Id: Iaf12f722fe6841ee1a55037fe33a6115aa699aca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QState: Added template PointerToMemberFunctionAndré Klitzing2014-12-202-1/+24
| | | | | | | | | | | | Added the function pointer to addTransition to take advantage of the new connect syntax. [ChangeLog][QtCore][State Machine] Added an addTransition() overload that takes a pointer-to-member for the signal triggering the transition. Change-Id: Ic97f7983839217ca0c8484b269d38221cbe804e3 Task-number: QTBUG-40293 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-0311-28/+28
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-2424-456/+264
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-5/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * Undo: Fix state entry bug for parallel state groupsPeter Kümmel2014-08-061-5/+1
| | | | | | | | | | | | | | | | | | | | This commit reverts c4cef6fae9f2a55f21fc9517855dfcf659c89081. The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not complete and introduces the regression QTBUG-30049. Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219 Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Export QAbstractState active property.BogDan Vatra2014-07-294-2/+49
| | | | | | | | | | | | | | It is needed to check if a State is active. Change-Id: I8aa0230b8cd96fb9b95b86b2ce118fe280f9ce97 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Emit a notifications when targetState and targetStates are changed.BogDan Vatra2014-06-302-3/+44
| | | | | | | | | | | | | | | | In order to properly use QAbstractTransition object in QML we need to know when these properties are changed. Change-Id: I5449ecf3fce33e164f645d7263f21b20abfcd026 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Emit a notifications when senderObject and signal are changed.BogDan Vatra2014-06-302-2/+36
| | | | | | | | | | | | | | | | | | In order to properly use QSignalTransition object in QML we need to know when these properties are changed. Change-Id: I7ca318d50513086146b85eaeee4dabbcdef8c299 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | Export QStateMachine running property.BogDan Vatra2014-06-262-2/+39
| | | | | | | | | | | | | | It is needed to control a QStateMachine object from QML. Change-Id: I19271d97718af2d688c477647d6341f70fdef3ea Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Emit a notifications when defaultState and historyType are changed.BogDan Vatra2014-06-252-4/+40
| | | | | | | | | | | | | | | | | | | | In order to properly use QHistoryState object in QML we need to know when these properties are changed. Change-Id: I28c783436410c84bc64a919ac18c183f7a5eb9ad Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Emit a notifications when childMode, initial and errorState are changed.BogDan Vatra2014-06-252-6/+57
|/ | | | | | | | | | | In order to properly use QState object in QML we need to know when these properties are changed. Change-Id: I37f8295e5201686a52d448cc42db331a8f8e792f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-54/+54
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-082-7/+7
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove qSort usages from statemachinesGiuseppe D'Angelo2013-09-111-2/+4
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I6edaafa75348a4e8795c3e29eeea9c45c178b621 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Changed digia contact details to */legal, updated licensesTeemu Kaukoranta2013-07-201-1/+1
| | | | | | | | Scripts are available in internal mkdist repo. Added license tags, updated licenses and copyrights/contacts Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-298-32/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1824-24/+24
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-084-7/+7
| | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Inserted hardcoded urls for State Charts and S. C. XMLNico Vertriest2012-12-111-5/+3
| | | | | | | | Corrected in qstatemachine QTBUG-28500 Change-Id: I45b2ffea983ee5754b080b8a6faa18d4d163e578 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtCore: Make more signals private.Stephen Kelly2012-11-284-10/+26
| | | | | | Change-Id: Ida190e8b9c1ff47a6f54a5bf68673ab50a2f1bfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Change license header from Nokia to DigiaSergio Ahumada2012-11-261-1/+1
| | | | | Change-Id: I2be215284d7670f60f8b5838fce1e6832dde2270 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Trim trailing whitespace.Stephen Kelly2012-10-223-32/+32
| | | | | Change-Id: Iee6bb66831f53399e5937eab5704af835979f5c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QSignalTransition take a pointer-to-const QObjectGiuseppe D'Angelo2012-09-266-9/+9
| | | | | | | | | | | | | | The obvious idea is that a connect() happens behind the scenes. As QObject::connect takes a pointer-to-const, QSignalTransition should do that as well. TODO: the API becomes asymmetric in that it takes a "const QObject *" but returns a "QObject *". Reasoning is needed. Change-Id: I18d0436e7036eee851fd36d5b8ccda4a4757938f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2224-574/+574
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-238-0/+10
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* statemachine: Really fix signal transition handling in multi-threaded setupKent Hansen2012-08-082-6/+27
| | | | | | | | | | | | | | | | | | | | | Commit f9a17d7f0f02f7af849afdf653a763ffdaf78a1b fixed it for the case where the sender object is in a different thread at transition setup time. However, it still didn't work if either the sender object or the state machine was moved to a different thread at some later time, before the machine was started. Therefore: Bite the sour grape and traverse all the machine's transitions when the machine is being started, registering those signal transitions whose sender objects are in other threads. This will increase the machine's startup time (proportional to the number of transitions), but at least it works in all known scenarios, meaning we don't have to document weird restrictions regarding the order in which the user's operations have to be done. Task-number: QTBUG-19789 Change-Id: I5f1dd1321994e49635f52be65cf56d2678ed1253 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Make states exit order spec-compliantKent Hansen2012-08-011-3/+3
| | | | | | | | | | The SCXML spec states that entry order should be equivalent to "document order" and exit order should be "reverse document order". Since QStateMachine uses child order for the entry order, the exit order should be reverse child order. Change-Id: Ia7b05fdd5c9261ccf202f64f8d23f5c88b20a8c3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QStateMachine: mark a ctor as explicitMarc Mutz2012-07-161-1/+1
| | | | | | | | Commit 0b66f723f06f6d115ea37d4db8bb6c0b5f63885b recently introduced a new QStateMachine constructor, but failed to mark it as explicit. Fix. Change-Id: I16037691ad77d528bb50b611c03063b17a71dd34 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* statemachine: Move RestorePolicy enum to QState classKent Hansen2012-07-165-44/+42
| | | | | | | | | | This makes it possible to add API for setting the restore policy per state, or even per property assignment (QTBUG-17861). This change is fully source compatible with Qt4. Change-Id: I53628546b070f6fc84891f86e7ad7bd8ef5ba285 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>