diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-07 12:07:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-07 12:08:39 +0200 |
commit | 5b89e61c39fb253dae46a8aa48d341a3fd37b4b4 (patch) | |
tree | 5cb87c847af5c330046b36301a3bf5b290d5f24b /src/scxml | |
parent | b490e1b782ac28a82d7902f926f6e041ede179ca (diff) | |
parent | 27c4c643bae356d5bbdb58e44ec4b7932f277886 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: I5fa1c321a36fb70023ac7d99879c34c5ceaf8bb3
Diffstat (limited to 'src/scxml')
-rw-r--r-- | src/scxml/qscxmlecmascriptdatamodel.cpp | 2 | ||||
-rw-r--r-- | src/scxml/qscxmlexecutablecontent.cpp | 20 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/scxml/qscxmlecmascriptdatamodel.cpp b/src/scxml/qscxmlecmascriptdatamodel.cpp index a12bb30..2bbf134 100644 --- a/src/scxml/qscxmlecmascriptdatamodel.cpp +++ b/src/scxml/qscxmlecmascriptdatamodel.cpp @@ -289,7 +289,7 @@ private: // Uses private API return; } - s->makeIdentifier(scope.engine); + s->makeIdentifier(); QV4::ScopedValue v(scope, QJSValuePrivate::convertedToValue(engine, value)); o->defineReadonlyProperty(s, v); if (engine->hasException) diff --git a/src/scxml/qscxmlexecutablecontent.cpp b/src/scxml/qscxmlexecutablecontent.cpp index 682ea47..2401aa6 100644 --- a/src/scxml/qscxmlexecutablecontent.cpp +++ b/src/scxml/qscxmlexecutablecontent.cpp @@ -418,15 +418,17 @@ const InstructionId *QScxmlExecutionEngine::step(const InstructionId *ip, bool * qCDebug(qscxmlLog) << stateMachine << "Executing log step"; const Log *log = reinterpret_cast<const Log *>(instr); ip += log->size(); - QString str = dataModel->evaluateToString(log->expr, ok); - if (*ok) { - const QString label = tableData->string(log->label); - qCDebug(scxmlLog) << label << ":" << str; - QMetaObject::invokeMethod(stateMachine, - "log", - Qt::QueuedConnection, - Q_ARG(QString, label), - Q_ARG(QString, str)); + if (log->expr != NoEvaluator) { + const QString str = dataModel->evaluateToString(log->expr, ok); + if (*ok) { + const QString label = tableData->string(log->label); + qCDebug(scxmlLog) << label << ":" << str; + QMetaObject::invokeMethod(stateMachine, + "log", + Qt::QueuedConnection, + Q_ARG(QString, label), + Q_ARG(QString, str)); + } } return ip; } |