diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:11:15 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:11:15 +0100 |
commit | 4f94bae73ccabfc714d248c6371f1883aacc1aa8 (patch) | |
tree | f95ae03bdcc0be49747614da2294d5986f43fd72 /src | |
parent | 2143fd3362cc294c3076f879ef20c70ed3683f33 (diff) | |
parent | 3d23818472e371745f4ad4bd4b6c92de3d119e34 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: Id4d40ec35ed8f13c7704d737312205f334139129
Diffstat (limited to 'src')
-rw-r--r-- | src/scxml/qscxmlcompiler.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/scxml/qscxmlcompiler.cpp b/src/scxml/qscxmlcompiler.cpp index 4256c72..5d3973d 100644 --- a/src/scxml/qscxmlcompiler.cpp +++ b/src/scxml/qscxmlcompiler.cpp @@ -683,7 +683,7 @@ QScxmlScxmlService *invokeDynamicScxmlService(const QString &sourceUrl, if (!compiler.errors().isEmpty()) { const auto errors = compiler.errors(); for (const QScxmlError &error : errors) - qWarning() << error.toString(); + qWarning().noquote() << error.toString(); return Q_NULLPTR; } @@ -692,7 +692,7 @@ QScxmlScxmlService *invokeDynamicScxmlService(const QString &sourceUrl, Q_ASSERT(!compiler.errors().isEmpty()); const auto errors = compiler.errors(); for (const QScxmlError &error : errors) - qWarning() << error.toString(); + qWarning().noquote() << error.toString(); return Q_NULLPTR; } @@ -845,7 +845,12 @@ void QScxmlCompilerPrivate::instantiateDataModel(QScxmlStateMachine *stateMachin #ifdef BUILD_QSCXMLC Q_UNUSED(stateMachine) #else - auto doc = scxmlDocument(); + if (!m_errors.isEmpty()) { + qWarning() << "SCXML document has errors"; + return; + } + + auto doc = m_doc.data(); auto root = doc ? doc->root : Q_NULLPTR; if (root == Q_NULLPTR) { qWarning() << "SCXML document has no root element"; |