aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/checkidentifiers.h
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-06-07 14:25:01 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-06-09 12:46:02 +0200
commit3c95bf5b6df7cfd12af3755d11b34db721e23f19 (patch)
tree20cbab375f99cd4e4f6463abdb105fe048b854ef /tools/qmllint/checkidentifiers.h
parent919e16acaeac6e92f5f402f0d81cf988c5b02cf0 (diff)
qmllint: Move a lot of warning logic to qmlcompiler
Moves the majority of qmllint warning logic to qmlcompiler, making them available to all tools using the library. The end goal is to get rid off the additional AST visitor in qmllint altogether (We can't quite yet until we have ported over type interference). This also prepares qmlcompiler to move to a two pass approach which isn't fully implemented in here yet due to the size of the change. Pick-to: 6.2 Change-Id: Id2e108340d26a75085ce6ed97d56dec03ea3a12d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/checkidentifiers.h')
-rw-r--r--tools/qmllint/checkidentifiers.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/qmllint/checkidentifiers.h b/tools/qmllint/checkidentifiers.h
index c23a64f9bd..81f86f7aeb 100644
--- a/tools/qmllint/checkidentifiers.h
+++ b/tools/qmllint/checkidentifiers.h
@@ -32,14 +32,10 @@
#include <QtQmlCompiler/private/qqmljslogger_p.h>
#include <QtQmlCompiler/private/qqmljsscope_p.h>
#include <QtQmlCompiler/private/qqmljsimporter_p.h>
+#include <QtQmlCompiler/private/qqmljsmetatypes_p.h>
class QColorOutput;
-struct SignalHandler {
- QQmlJSMetaMethod signal;
- bool isMultiline;
-};
-
struct FieldMember
{
QString m_name;
@@ -57,10 +53,10 @@ public:
m_logger(logger), m_code(code), m_types(types), m_fileName(fileName)
{}
- void operator ()(const QHash<QString, QQmlJSScope::ConstPtr> &qmlIDs,
- const QHash<QQmlJS::SourceLocation, SignalHandler> &signalHandlers,
- const MemberAccessChains &memberAccessChains,
- const QQmlJSScope::ConstPtr &root, const QString &rootId) const;
+ void operator()(const QHash<QString, QQmlJSScope::ConstPtr> &qmlIDs,
+ const QHash<QQmlJS::SourceLocation, QQmlJSMetaSignalHandler> &signalHandlers,
+ const MemberAccessChains &memberAccessChains, const QQmlJSScope::ConstPtr &root,
+ const QString &rootId) const;
private:
void checkMemberAccess(const QVector<FieldMember> &members,