diff options
authorMarc Schmitzer <>2011-11-28 15:43:28 -0800
committerNo'am Rosenthal <>2011-11-28 15:43:28 -0800
commiteb07b340d03fd5749205490c766020b59d740e98 (patch)
parent4c03ed9c7da88f3cbd45224170cf78396ba63975 (diff)
Clear script in curExecContext after applying it to a transition in 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 <>
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qscxml.cpp b/src/qscxml.cpp
index ec78f9a..c44e135 100644
--- a/src/qscxml.cpp
+++ b/src/qscxml.cpp
@@ -1507,6 +1507,7 @@ void QScxmlLoader::loadState (
curExecContext.trans = curTransition;
curExecContext.type = ScExecContext::Transition;
+ curExecContext.script = "";
curExecContext.type = ScExecContext::None;
} else if ("invoke",Qt::CaseInsensitive) == 0) {