diff options
Diffstat (limited to 'src/scxml/qscxmlcompiler.cpp')
-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 626015b..f259eee 100644 --- a/src/scxml/qscxmlcompiler.cpp +++ b/src/scxml/qscxmlcompiler.cpp @@ -685,7 +685,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; } @@ -694,7 +694,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; } @@ -847,7 +847,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"; |