Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmljslintertypepropagator_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant
4
5#ifndef QQMLJSLINTERTYPEPROPAGATOR_P_H
6#define QQMLJSLINTERTYPEPROPAGATOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17
19
21
27
28
29class Q_QMLCOMPILER_EXPORT QQmlJSLinterTypePropagator : public QQmlJSTypePropagator
30{
31public:
32 QQmlJSLinterTypePropagator(const QV4::Compiler::JSUnitGenerator *unitGenerator,
33 const QQmlJSTypeResolver *typeResolver, QQmlJSLogger *logger,
34 const BasicBlocks &basicBlocks = {},
35 const InstructionAnnotations &annotations = {},
36 QQmlSA::PassManager *passManager = nullptr,
37 const ContextPropertyInfo &contextPropertyInfo = {});
38
39private:
40
41 void generate_Ret() override;
42 void generate_LoadQmlContextPropertyLookup(int index) override;
43 void generate_GetOptionalLookup(int index, int offset) override;
44 void generate_StoreProperty(int nameIndex, int base) override;
45 void generate_CallProperty(int nameIndex, int base, int argc, int argv) override;
46 void generate_CallPossiblyDirectEval(int argc, int argv) override;
47
48 void handleUnqualifiedAccess(const QString &name, bool isMethod) const override;
49 void handleUnqualifiedAccessAndContextProperties(const QString &name, bool isMethod) const override;
50 void checkDeprecated(QQmlJSScope::ConstPtr scope, const QString &name, bool isMethod) const override;
51 bool isCallingProperty(QQmlJSScope::ConstPtr scope, const QString &name) const override;
52 bool handleImportNamespaceLookup(const QString &propertyName) override;
53 void handleLookupError(const QString &propertyName) override;
54 bool checkForEnumProblems(QQmlJSRegisterContent base, const QString &propertyName) override;
55 void generate_StoreNameCommon(int nameIndex) override;
56 void propagatePropertyLookup(const QString &name,
57 int lookupIndex = QQmlJSRegisterContent::InvalidLookupIndex) override;
58 void propagateCall(const QList<QQmlJSMetaMethod> &methods, int argc, int argv,
59 QQmlJSRegisterContent scope) override;
60 void propagateTranslationMethod_SAcheck(const QString &methodName) override;
61 void warnAboutTypeCoercion(int lhs) override;
62
63 QQmlSA::PassManager *m_passManager = nullptr;
64 ContextPropertyInfo m_contextPropertyInfo;
65};
66
67QT_END_NAMESPACE
68
69#endif // QQMLJSLINTERTYPEPROPAGATOR_P_H
Combined button and popup list for selecting options.
static bool isStringOrNumberOrBoolean(const QQmlJSScope::ConstPtr &scope, const QQmlJSTypeResolver *resolver)
static bool shouldMentionRequiredProperties(const QQmlJSScope::ConstPtr &qmlScope)
static bool isVoidOrUndefined(const QQmlJSScope::ConstPtr &scope, const QQmlJSTypeResolver *resolver)
static bool mightContainStringOrNumberOrBoolean(const QQmlJSScope::ConstPtr &scope, const QQmlJSTypeResolver *resolver)
static bool requiresStrictEquality(const QQmlJSScope::ConstPtr &lhs, const QQmlJSScope::ConstPtr &rhs, const QQmlJSTypeResolver *resolver)
QQmlJS::HeuristicContextProperties heuristicContextProperties
QQmlJS::UserContextProperties userContextProperties