diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-18 10:31:10 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-18 09:56:45 +0000 |
commit | 11d01e3b74c84e465246a8f164b3f3b8ff92d8a4 (patch) | |
tree | 4be7398ef6a2c2d716f3f5de100144e30181d7ab /src/qdoc/qmlcodeparser.cpp | |
parent | f1391564f6119973f46f0792b77fa65210ef00ae (diff) |
Handle recursion depth errors when parsing JavaScript
Implementations of QQmlJS::AST::Visitor are required to do so.
Fixes: QTBUG-74510
Change-Id: I061240f15ce082a05dd7829d225a5bfc3edd896a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qdoc/qmlcodeparser.cpp')
-rw-r--r-- | src/qdoc/qmlcodeparser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp index 31775bb1b..882f83304 100644 --- a/src/qdoc/qmlcodeparser.cpp +++ b/src/qdoc/qmlcodeparser.cpp @@ -192,6 +192,10 @@ void QmlCodeParser::parseSourceFile(const Location& location, const QString& fil metacommandsAllowed, topicCommandsAllowed); QQmlJS::AST::Node::accept(ast, &visitor); + if (visitor.hasError()) { + qDebug().nospace() << qPrintable(filePath) << ": Could not analyze QML file. " + << "The output is incomplete."; + } } foreach (const QQmlJS::DiagnosticMessage &msg, parser->diagnosticMessages()) { qDebug().nospace() << qPrintable(filePath) << ':' << msg.loc.startLine |