From 11d01e3b74c84e465246a8f164b3f3b8ff92d8a4 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 18 Mar 2019 10:31:10 +0100 Subject: 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 --- src/qdoc/qmlcodeparser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qdoc/qmlcodeparser.cpp') 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 -- cgit v1.2.1