diff options
author | Semih Yavuz <semih.yavuz@qt.io> | 2023-11-07 15:02:24 +0100 |
---|---|---|
committer | Semih Yavuz <semih.yavuz@qt.io> | 2023-11-07 18:29:43 +0100 |
commit | 445a52209db72287f7bd57f01fbb54b102bb042b (patch) | |
tree | bf54d7bcedbf9cf0797ffe4f5ae08a94fcb420f5 /src/scxml/qscxmlcompiler.cpp | |
parent | f2158ffff4379f77906fc63d6ae013b2a3ea7e0d (diff) |
qtscxml: Error out when no script content given
Standard says https://www.w3.org/TR/scxml/#script that there should
be either src or some content in the script tag. Compiling should fail
with non-conformant .scxml files.
Adjust the number of the errors in a few test because of newly added
error.
Pick-to: 5.15 6.5 6.6
Fixes: QTBUG-118050
Change-Id: Ib72f7cca53e427a5a83a6aaa3a8a197818e8693f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/scxml/qscxmlcompiler.cpp')
-rw-r--r-- | src/scxml/qscxmlcompiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scxml/qscxmlcompiler.cpp b/src/scxml/qscxmlcompiler.cpp index ffd0ab6..eaf7171 100644 --- a/src/scxml/qscxmlcompiler.cpp +++ b/src/scxml/qscxmlcompiler.cpp @@ -2048,6 +2048,9 @@ bool QScxmlCompilerPrivate::postReadElementScript() scriptI->content = QString::fromUtf8(data); } } + } else { + addError(scriptI->xmlLocation, + QStringLiteral("neither src nor any content has been given in the script tag")); } return flushInstruction(); } |