summaryrefslogtreecommitdiff
path: root/src/qdoc/qmlvisitor.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-03-18 10:31:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-18 09:56:45 +0000
commit11d01e3b74c84e465246a8f164b3f3b8ff92d8a4 (patch)
tree4be7398ef6a2c2d716f3f5de100144e30181d7ab /src/qdoc/qmlvisitor.h
parentf1391564f6119973f46f0792b77fa65210ef00ae (diff)
downloadqttools-11d01e3b74c84e465246a8f164b3f3b8ff92d8a4.tar.gz
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/qmlvisitor.h')
-rw-r--r--src/qdoc/qmlvisitor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h
index 321819457..6e73171dc 100644
--- a/src/qdoc/qmlvisitor.h
+++ b/src/qdoc/qmlvisitor.h
@@ -92,6 +92,9 @@ public:
bool visit(QQmlJS::AST::UiQualifiedId *) override;
void endVisit(QQmlJS::AST::UiQualifiedId *) override;
+ void throwRecursionDepthError();
+ bool hasError() const;
+
private:
QString getFullyQualifiedId(QQmlJS::AST::UiQualifiedId *id);
QQmlJS::AST::SourceLocation precedingComment(quint32 offset) const;
@@ -112,6 +115,7 @@ private:
QSet<QString> topics_;
QSet<quint32> usedComments;
Aggregate *current;
+ bool hasRecursionDepthError = false;
};
#endif