summaryrefslogtreecommitdiffstats
path: root/src/qscxml.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change parsing of "event" attribute of transitions.HEADmasterMarc Schmitzer2012-01-271-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the event prefixes for a transition where obtained by using QString::split(' ') on the value of the "event" attribute. QString::split() also retains empty strings resulting from the split, which has two consequences: 1) If the event attribute is empty or missing, a QStringList containing a single empty string is returned. This makes event-less transitions work, which are executed immediately (if the condition is met). 2) If the event attribute contains multiple prefixes separated by more than one space character, the returned list contains the prefixes *and* one or more empty strings. This makes the transition trigger immediately and on *any* event. Since an extra space is an easy mistake to make and difficult to spot (speaking from experience), this behaviour is rather undesirable. To fix this, this patch changes the parsing of the event attribute to use QString::split(' ', QString::SkipEmptyParts). This fixes (2) but breaks (1). To keep event-less transitions working, QScxmlTransition::eventTest() is changed to match events of type QEvent::None if the transition has no event prefixes. Due to the above change, this is the case when the "event" attribute is ommitted or contains only space characters. NOTE: Strictly speaking, this removes a feature from qscxml. In the previous state, it was possible to create a transition (presumably with a guard condition) that is both executed immediately when its source state is entered *and* triggered by one or more signals. With this change, a transition can only be either immediate or triggered by (an) event(s), not both. The W3C scxml specification seems to specify this behaviour (see http://www.w3.org/TR/scxml/#SelectingTransitions ).
* Clear script in curExecContext after applying it to a transition in ↵Marc Schmitzer2011-11-281-0/+1
| | | | | | | | | | | | QScxmlLoader::loadState(). Without this change, the script is also applied to the state containing the transition in line 1502 if the state sources an external scxml file (via the "src") attribute. In that case, the next element processed by the parser is the closing </scxml> if the transition containing the script is the last in the file. Maybe this should better be fixed in the block starting at line 1499, but clearing the script *after* applying it somewhere seems safe enough. Merge-request: 3 Reviewed-by: No'am Rosenthal <noam.rosenthal@nokia.com>
* removed fringe featuresNo'am Rosenthal2009-11-261-134/+10
|
* updated license headersNo'am Rosenthal2009-11-261-3/+35
|
* many fixes and optimizations to SCXMLNo'am Rosenthal2009-11-261-48/+135
|
* adjusted for postInternalEvent API changeNo'am Rosenthal2009-10-031-1/+1
|
* Changes in QStateMachine (rootState)No'am Rosenthal2009-07-221-3/+3
|
* Enabled using SCXML with an existing QScriptEngineNo'am Rosenthal2009-07-121-29/+53
|
* Work with the new activated trigger from QAbstractTransitionNoam Rosenthal2009-06-181-14/+10
|
* Bug fixes after testing with VUINoam Rosenthal2009-06-151-88/+274
|
* Fix headers for labsNoam Rosenthal2009-06-081-15/+2
|
* Fix headers for labsNoam Rosenthal2009-06-081-30/+12
|
* Documentation fixesNoam Rosenthal2009-06-081-7/+15
|
* some missing filesNoam Rosenthal2009-06-081-59/+66
|
* scxml for 4.6Noam Rosenthal2009-06-081-0/+1428