aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/findwarnings.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-30 14:44:24 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-02 15:33:10 +0200
commit7957752447fbd2581521b13156ef29ffc80ad7bf (patch)
tree05a669e525b4eadc706fff3cbd40f6da9602f23d /tools/qmllint/findwarnings.h
parentb078890608344f0556a0ff50aab62ede83e0e180 (diff)
qmllint: Unify injected and "normal" JavaScript identifiers
The specifics of how to warn about the injected identifiers are moved out of ScopeTree as that is not related to the structure of the scopes. Change-Id: I26418c3fa492da8339abf045a4034a8464b7bbb8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/findwarnings.h')
-rw-r--r--tools/qmllint/findwarnings.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qmllint/findwarnings.h b/tools/qmllint/findwarnings.h
index 382c4cab11..e160e8751c 100644
--- a/tools/qmllint/findwarnings.h
+++ b/tools/qmllint/findwarnings.h
@@ -43,6 +43,7 @@
#include "scopetree.h"
#include "qcoloroutput.h"
#include "qmljsimporter.h"
+#include "checkidentifiers.h"
#include <QtQml/private/qqmldirparser_p.h>
#include <QtQml/private/qqmljsastvisitor_p.h>
@@ -63,6 +64,9 @@ public:
private:
QmlJSImporter::ImportedTypes m_rootScopeImports;
+ QHash<QQmlJS::SourceLocation, SignalHandler> m_signalHandlers;
+ QQmlJS::SourceLocation m_pendingSingalHandler;
+
ScopeTree::Ptr m_rootScope;
ScopeTree::Ptr m_currentScope;
QQmlJS::AST::ExpressionNode *m_fieldMemberBase = nullptr;
@@ -97,6 +101,7 @@ private:
void parseHeaders(QQmlJS::AST::UiHeaderItemList *headers);
ScopeTree::Ptr parseProgram(QQmlJS::AST::Program *program, const QString &name);
+ void flushPendingSignalParameters();
void throwRecursionDepthError() override;
@@ -116,6 +121,9 @@ private:
bool visit(QQmlJS::AST::ForEachStatement *ast) override;
void endVisit(QQmlJS::AST::ForEachStatement *ast) override;
+ bool visit(QQmlJS::AST::ExpressionStatement *ast) override;
+ void endVisit(QQmlJS::AST::ExpressionStatement *ast) override;
+
bool visit(QQmlJS::AST::Block *ast) override;
void endVisit(QQmlJS::AST::Block *ast) override;