summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNo'am Rosenthal <noam.rosenthal@nokia.com>2009-07-22 20:25:16 -0700
committerNo'am Rosenthal <noam.rosenthal@nokia.com>2009-07-22 20:25:16 -0700
commit7092b921c0c18f7ba202eb5a01934cc1a850c04a (patch)
tree5c156c543757e94ed59805887a7bf78412a34e93
parent084833d82e280f505088a278250bfb395a3a67ef (diff)
Changes in QStateMachine (rootState)
-rw-r--r--src/qscxml.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qscxml.cpp b/src/qscxml.cpp
index c6cf8da..daa1ec6 100644
--- a/src/qscxml.cpp
+++ b/src/qscxml.cpp
@@ -1252,7 +1252,7 @@ void QScxmlLoader::loadState (
if (stateID == "") {
topLevelState = curState = stateParam;
stateInfo[curState].initial = r.attributes().value("initial").toString();
- if (curState == stateMachine->rootState()) {
+ if (curState == stateMachine) {
stateMachine->scriptEngine()->globalObject().setProperty("_name",qScriptValueFromValue<QString>(stateMachine->scriptEngine(),r.attributes().value("name").toString()));
}
@@ -1273,7 +1273,7 @@ void QScxmlLoader::loadState (
newState->setObjectName(id);
if (!id.isEmpty() && stateInfo[curState].initial == id) {
- if (curState == stateMachine->rootState())
+ if (curState == stateMachine)
stateMachine->setInitialState(newState);
else
curState->setInitialState(newState);
@@ -1553,7 +1553,7 @@ QScxml* QScxmlLoader::load(QIODevice* device, QObject* obj, const QString & file
}
stateMachine = new QScxml(obj);
// traverse through the states
- loadState(stateMachine->rootState(),device,"",filename);
+ loadState(stateMachine,device,"",filename);
// resolve history default state
foreach (ScHistoryInfo h, historyInfo) {