Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJSImportVisitor Class Reference

#include <qqmljsimportvisitor_p.h>

+ Inheritance diagram for QQmlJSImportVisitor:
+ Collaboration diagram for QQmlJSImportVisitor:

Classes

struct  FunctionOrExpressionIdentifier
 
struct  PendingPropertyObjectBinding
 
struct  PendingPropertyType
 
struct  RequiredProperty
 
struct  UnfinishedBinding
 
struct  WithVisibilityScope
 Utility wrapper that adds visibility scope to the data. More...
 

Public Member Functions

 QQmlJSImportVisitor ()
 
 QQmlJSImportVisitor (const QQmlJSScope::Ptr &target, QQmlJSImporter *importer, QQmlJSLogger *logger, const QString &implicitImportDirectory, const QStringList &qmldirFiles=QStringList())
 
 ~QQmlJSImportVisitor ()
 
QQmlJSScope::Ptr result () const
 
const QQmlJSLoggerlogger () const
 
QQmlJSLoggerlogger ()
 
QQmlJSImporter::ImportedTypes imports () const
 
QQmlJSScopesById addressableScopes () const
 
QHash< QQmlJS::SourceLocation, QQmlJSMetaSignalHandlersignalHandlers () const
 
QSet< QQmlJSScope::ConstPtrliteralScopesToCheck () const
 
QList< QQmlJSScope::ConstPtrqmlTypes () const
 
QHash< QV4::CompiledData::Location, QQmlJSScope::ConstPtrscopesBylocation () const
 
QQmlJSImporterimporter ()
 
const QQmlJSImporterimporter () const
 
- Public Member Functions inherited from QQmlJS::AST::Visitor
 Visitor (quint16 parentRecursionDepth=0)
 
bool preVisit (Node *) override
 
void postVisit (Node *) override
 
- Public Member Functions inherited from QQmlJS::AST::BaseVisitor
 BaseVisitor (quint16 parentRecursionDepth=0)
 
virtual ~BaseVisitor ()
 
virtual bool preVisit (Node *)=0
 
virtual void postVisit (Node *)=0
 
virtual QQmlJSASTClassListToVisit void throwRecursionDepthError ()=0
 
quint16 recursionDepth () const
 

Static Public Member Functions

static QString implicitImportDirectory (const QString &localFile, QQmlJSResourceFileMapper *mapper)
 

Protected Types

enum class  BindingExpressionParseResult { Invalid , Script , Literal , Translation }
 
using RootDocumentNameType = QQmlJSScope::RootDocumentNameType
 
using InlineComponentNameType = QQmlJSScope::InlineComponentNameType
 
using InlineComponentOrDocumentRootName = QQmlJSScope::RootDocumentNameType
 

Protected Member Functions

bool visit (QQmlJS::AST::StringLiteral *) override
 
bool visit (QQmlJS::AST::ExpressionStatement *ast) override
 
void endVisit (QQmlJS::AST::ExpressionStatement *ast) override
 
bool visit (QQmlJS::AST::UiProgram *) override
 
void endVisit (QQmlJS::AST::UiProgram *) override
 
bool visit (QQmlJS::AST::UiObjectDefinition *) override
 
void endVisit (QQmlJS::AST::UiObjectDefinition *) override
 
bool visit (QQmlJS::AST::UiInlineComponent *) override
 
void endVisit (QQmlJS::AST::UiInlineComponent *) override
 
bool visit (QQmlJS::AST::UiPublicMember *) override
 
void endVisit (QQmlJS::AST::UiPublicMember *) override
 
bool visit (QQmlJS::AST::UiRequired *required) override
 
bool visit (QQmlJS::AST::UiScriptBinding *) override
 
void endVisit (QQmlJS::AST::UiScriptBinding *) override
 
bool visit (QQmlJS::AST::UiArrayBinding *) override
 
void endVisit (QQmlJS::AST::UiArrayBinding *) override
 
bool visit (QQmlJS::AST::UiEnumDeclaration *uied) override
 
bool visit (QQmlJS::AST::FunctionExpression *fexpr) override
 
void endVisit (QQmlJS::AST::FunctionExpression *) override
 
bool visit (QQmlJS::AST::UiSourceElement *) override
 
bool visit (QQmlJS::AST::FunctionDeclaration *fdecl) override
 
void endVisit (QQmlJS::AST::FunctionDeclaration *) override
 
bool visit (QQmlJS::AST::ClassExpression *ast) override
 
void endVisit (QQmlJS::AST::ClassExpression *) override
 
bool visit (QQmlJS::AST::UiImport *import) override
 
bool visit (QQmlJS::AST::UiPragma *pragma) override
 
bool visit (QQmlJS::AST::ClassDeclaration *ast) override
 
void endVisit (QQmlJS::AST::ClassDeclaration *ast) override
 
bool visit (QQmlJS::AST::ForStatement *ast) override
 
void endVisit (QQmlJS::AST::ForStatement *ast) override
 
bool visit (QQmlJS::AST::ForEachStatement *ast) override
 
void endVisit (QQmlJS::AST::ForEachStatement *ast) override
 
bool visit (QQmlJS::AST::Block *ast) override
 
void endVisit (QQmlJS::AST::Block *ast) override
 
bool visit (QQmlJS::AST::CaseBlock *ast) override
 
void endVisit (QQmlJS::AST::CaseBlock *ast) override
 
bool visit (QQmlJS::AST::Catch *ast) override
 
void endVisit (QQmlJS::AST::Catch *ast) override
 
bool visit (QQmlJS::AST::WithStatement *withStatement) override
 
void endVisit (QQmlJS::AST::WithStatement *ast) override
 
bool visit (QQmlJS::AST::VariableDeclarationList *vdl) override
 
bool visit (QQmlJS::AST::FormalParameterList *fpl) override
 
bool visit (QQmlJS::AST::UiObjectBinding *uiob) override
 
void endVisit (QQmlJS::AST::UiObjectBinding *uiob) override
 
bool visit (QQmlJS::AST::ExportDeclaration *exp) override
 
void endVisit (QQmlJS::AST::ExportDeclaration *exp) override
 
bool visit (QQmlJS::AST::ESModule *module) override
 
void endVisit (QQmlJS::AST::ESModule *module) override
 
bool visit (QQmlJS::AST::Program *program) override
 
void endVisit (QQmlJS::AST::Program *program) override
 
void endVisit (QQmlJS::AST::FieldMemberExpression *) override
 
bool visit (QQmlJS::AST::IdentifierExpression *idexp) override
 
bool visit (QQmlJS::AST::PatternElement *) override
 
void throwRecursionDepthError () override
 
QQmlJSMetaMethod::RelativeFunctionIndex addFunctionOrExpression (const QQmlJSScope::ConstPtr &scope, const QString &name)
 
void forgetFunctionExpression (const QString &name)
 
int synthesizeCompilationUnitRuntimeFunctionIndices (const QQmlJSScope::Ptr &scope, int count) const
 
void populateRuntimeFunctionIndicesForDocument () const
 
void enterEnvironment (QQmlJSScope::ScopeType type, const QString &name, const QQmlJS::SourceLocation &location)
 
bool enterEnvironmentNonUnique (QQmlJSScope::ScopeType type, const QString &name, const QQmlJS::SourceLocation &location)
 
void leaveEnvironment ()
 
template<typename ErrorHandler >
bool isTypeResolved (const QQmlJSScope::ConstPtr &type, ErrorHandler handle)
 
bool isTypeResolved (const QQmlJSScope::ConstPtr &type)
 
QVector< QQmlJSAnnotationparseAnnotations (QQmlJS::AST::UiAnnotationList *list)
 
void setAllBindings ()
 
void addDefaultProperties ()
 
void processDefaultProperties ()
 
void processPropertyBindings ()
 
void checkRequiredProperties ()
 
void processPropertyTypes ()
 
void processPropertyBindingObjects ()
 
void flushPendingSignalParameters ()
 
QQmlJSScope::ConstPtr scopeById (const QString &id, const QQmlJSScope::ConstPtr &current)
 
void breakInheritanceCycles (const QQmlJSScope::Ptr &scope)
 
void checkDeprecation (const QQmlJSScope::ConstPtr &scope)
 
void checkGroupedAndAttachedScopes (QQmlJSScope::ConstPtr scope)
 
bool rootScopeIsValid () const
 
BindingExpressionParseResult parseBindingExpression (const QString &name, const QQmlJS::AST::Statement *statement)
 
bool isImportPrefix (QString prefix) const
 

Protected Attributes

QString m_implicitImportDirectory
 
QStringList m_qmldirFiles
 
QQmlJSScope::Ptr m_currentScope
 
const QQmlJSScope::Ptr m_exportedRootScope
 
QQmlJSImporterm_importer = nullptr
 
QQmlJSLoggerm_logger = nullptr
 
QQmlJSScope::InlineComponentOrDocumentRootName m_currentRootName
 
bool m_nextIsInlineComponent = false
 
bool m_rootIsSingleton = false
 
QQmlJSScope::Ptr m_savedBindingOuterScope
 
QQmlJSScope::ConstPtr m_globalScope
 
QQmlJSScopesById m_scopesById
 
QQmlJSImporter::ImportedTypes m_rootScopeImports
 
QList< QQmlJSScope::ConstPtrm_qmlTypes
 
QHash< QV4::CompiledData::Location, QQmlJSScope::ConstPtrm_scopesByIrLocation
 
QMultiHash< QString, QQmlJS::SourceLocationm_importTypeLocationMap
 
QMultiHash< QString, QQmlJS::SourceLocationm_importStaticModuleLocationMap
 
QSet< QQmlJS::SourceLocationm_importLocations
 
QSet< QStringm_usedTypes
 
QList< UnfinishedBindingm_bindings
 
QHash< QQmlJSScope::ConstPtr, QList< QString > > m_functionsAndExpressions
 
bool m_thisScriptBindingIsJavaScript = false
 
QStack< FunctionOrExpressionIdentifierm_functionStack
 
QHash< FunctionOrExpressionIdentifier, int > m_innerFunctions
 
QSet< QQmlJSScope::ConstPtrm_unresolvedTypes
 
QVector< QQmlJSAnnotationm_pendingMethodAnnotations
 
QHash< QQmlJSScope::Ptr, QVector< QQmlJSScope::Ptr > > m_pendingDefaultProperties
 
QVector< PendingPropertyTypem_pendingPropertyTypes
 
QVector< PendingPropertyObjectBindingm_pendingPropertyObjectBindings
 
QVector< RequiredPropertym_requiredProperties
 
QVector< QQmlJSScope::Ptrm_objectBindingScopes
 
QVector< QQmlJSScope::Ptrm_objectDefinitionScopes
 
QHash< QQmlJSScope::Ptr, QVector< WithVisibilityScope< QString > > > m_propertyBindings
 
QHash< QQmlJS::SourceLocation, QQmlJSMetaSignalHandlerm_signalHandlers
 
QSet< QQmlJSScope::ConstPtrm_literalScopesToCheck
 
QQmlJS::SourceLocation m_pendingSignalHandler
 
- Protected Attributes inherited from QQmlJS::AST::BaseVisitor
quint16 m_recursionDepth = 0
 

Friends

class QQmlJS::Dom::QQmlDomAstCreatorWithQQmlJSScope
 

Detailed Description

Definition at line 41 of file qqmljsimportvisitor_p.h.

Member Typedef Documentation

◆ InlineComponentNameType

◆ InlineComponentOrDocumentRootName

◆ RootDocumentNameType

Member Enumeration Documentation

◆ BindingExpressionParseResult

Enumerator
Invalid 
Script 
Literal 
Translation 

Definition at line 272 of file qqmljsimportvisitor_p.h.

Constructor & Destructor Documentation

◆ QQmlJSImportVisitor() [1/2]

QQmlJSImportVisitor::QQmlJSImportVisitor ( )

◆ QQmlJSImportVisitor() [2/2]

QQmlJSImportVisitor::QQmlJSImportVisitor ( const QQmlJSScope::Ptr target,
QQmlJSImporter importer,
QQmlJSLogger logger,
const QString implicitImportDirectory,
const QStringList qmldirFiles = QStringList() 
)

Definition at line 75 of file qqmljsimportvisitor.cpp.

◆ ~QQmlJSImportVisitor()

QQmlJSImportVisitor::~QQmlJSImportVisitor ( )
default

Member Function Documentation

◆ addDefaultProperties()

void QQmlJSImportVisitor::addDefaultProperties ( )
protected

Definition at line 1074 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::baseType(), QQmlJSScope::defaultPropertyName(), getScopeName(), QQmlJSScope::isArrayScope(), QString::isEmpty(), QQmlJSScope::isInCustomParserParent(), QQmlJSScope::isInlineComponent(), m_bindings, m_currentScope, m_exportedRootScope, m_pendingDefaultProperties, QQmlJSScope::parentScope(), QQmlSA::QMLScope, QQmlJSMetaPropertyBinding::setObject(), QQmlJSScope::sourceLocation(), and QQmlJSScope::UnnamedPropertyTarget.

Referenced by visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addFunctionOrExpression()

QQmlJSMetaMethod::RelativeFunctionIndex QQmlJSImportVisitor::addFunctionOrExpression ( const QQmlJSScope::ConstPtr scope,
const QString name 
)
protected

Records a JS function or a Script binding for a given scope. Returns an index of a just recorded function-or-expression.

See also
synthesizeCompilationUnitRuntimeFunctionIndices

Definition at line 1223 of file qqmljsimportvisitor.cpp.

References function, m_functionsAndExpressions, m_functionStack, and m_innerFunctions.

Referenced by parseBindingExpression(), and visit().

+ Here is the caller graph for this function:

◆ addressableScopes()

QQmlJSScopesById QQmlJSImportVisitor::addressableScopes ( ) const
inline

Definition at line 62 of file qqmljsimportvisitor_p.h.

Referenced by QQmlJSTypeResolver::init(), QQmlSA::GenericPass::resolveElementToId(), and QQmlSA::GenericPass::resolveIdToElement().

+ Here is the caller graph for this function:

◆ breakInheritanceCycles()

void QQmlJSImportVisitor::breakInheritanceCycles ( const QQmlJSScope::Ptr scope)
protected

Definition at line 1114 of file qqmljsimportvisitor.cpp.

References QList< T >::append(), QString::append(), QQmlJSScope::baseType(), QQmlJSScope::baseTypeError(), QQmlJSScope::baseTypeName(), QQmlJSScope::clearBaseType(), QListSpecialMethodsBase< T >::contains(), QQmlJSUtils::didYouMean(), error, QList< T >::first(), QQmlJSScope::internalName(), QQmlJSLogger::log(), m_logger, m_rootScopeImports, qmlImport, qmlInheritanceCycle, QStringLiteral, QQmlJSScope::setBaseTypeError(), QQmlJSScope::sourceLocation(), and QQmlJSScope::ContextualTypes::types().

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkDeprecation()

void QQmlJSImportVisitor::checkDeprecation ( const QQmlJSScope::ConstPtr scope)
protected

Definition at line 1156 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::annotations(), arg, QQmlJSScope::baseType(), QQmlJSScope::internalName(), QString::isEmpty(), QQmlJSLogger::log(), m_logger, qmlDeprecated, QStringLiteral, QQQmlJSDeprecation::reason, and QQmlJSScope::sourceLocation().

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkGroupedAndAttachedScopes()

void QQmlJSImportVisitor::checkGroupedAndAttachedScopes ( QQmlJSScope::ConstPtr  scope)
protected

Definition at line 1175 of file qqmljsimportvisitor.cpp.

References arg, QQmlSA::AttachedPropertyScope, QQmlJSScope::childScopes(), QQmlSA::GroupedPropertyScope, QQmlJSScope::isInCustomParserParent(), QQmlJSLogger::log(), m_logger, qmlUnqualified, and QStringLiteral.

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkRequiredProperties()

void QQmlJSImportVisitor::checkRequiredProperties ( )
protected

Definition at line 753 of file qqmljsimportvisitor.cpp.

References QList< T >::at(), QQmlJSScope::baseType(), QList< T >::constBegin(), QList< T >::constEnd(), getScopeName(), QQmlJSScopesById::id(), QString::isEmpty(), QQmlJSScope::isInlineComponent(), QDeferredSharedPointer< T >::isNull(), QQmlJSLogger::log(), m_exportedRootScope, m_globalScope, m_logger, m_objectDefinitionScopes, m_requiredProperties, m_scopesById, QQmlJSScope::ownProperties(), property, qmlRequired, QQmlSA::QMLScope, QStringLiteral, QQmlJSFixSuggestion::setFilename(), and QList< T >::size().

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endVisit() [1/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::Block ast)
overrideprotected

Definition at line 2393 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [2/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::CaseBlock ast)
overrideprotected

Definition at line 2405 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [3/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::Catch ast)
overrideprotected

Definition at line 2422 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [4/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ClassDeclaration ast)
overrideprotected

Definition at line 2353 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [5/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ClassExpression )
overrideprotected

Definition at line 1725 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [6/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ESModule module)
overrideprotected

Definition at line 2648 of file qqmljsimportvisitor.cpp.

References m_exportedRootScope, m_rootScopeImports, m_usedTypes, and QQmlJSScope::resolveTypes().

+ Here is the call graph for this function:

◆ endVisit() [7/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ExportDeclaration exp)
overrideprotected

Definition at line 2630 of file qqmljsimportvisitor.cpp.

References m_currentScope, m_exportedRootScope, m_globalScope, QQmlJSScope::parentScope(), Q_ASSERT, and rootScopeIsValid().

+ Here is the call graph for this function:

◆ endVisit() [8/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ExpressionStatement ast)
overrideprotected

Definition at line 1334 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::baseTypeName(), QQmlSA::JSFunctionScope, leaveEnvironment(), m_currentScope, and QQmlJSScope::scopeType().

+ Here is the call graph for this function:

◆ endVisit() [9/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::FieldMemberExpression fieldMember)
overrideprotected

Definition at line 2669 of file qqmljsimportvisitor.cpp.

References QMultiHash< Key, T >::contains(), QQmlJSScope::ContextualTypes::hasType(), QSet< T >::insert(), m_importTypeLocationMap, m_rootScopeImports, m_usedTypes, QQmlJS::AST::FieldMemberExpression::name, QStringView::toString(), and QQmlJSScope::ContextualTypes::type().

+ Here is the call graph for this function:

◆ endVisit() [10/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ForEachStatement ast)
overrideprotected

Definition at line 2377 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [11/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::ForStatement ast)
overrideprotected

Definition at line 2365 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ endVisit() [12/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::FunctionDeclaration fdecl)
overrideprotected

Definition at line 1709 of file qqmljsimportvisitor.cpp.

References forgetFunctionExpression(), leaveEnvironment(), QQmlJS::AST::FunctionExpression::name, and QStringView::toString().

+ Here is the call graph for this function:

◆ endVisit() [13/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::FunctionExpression fexpr)
overrideprotected

Definition at line 1691 of file qqmljsimportvisitor.cpp.

References forgetFunctionExpression(), leaveEnvironment(), QQmlJS::AST::FunctionExpression::name, and QStringView::toString().

+ Here is the call graph for this function:

◆ endVisit() [14/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::Program program)
overrideprotected

Definition at line 2664 of file qqmljsimportvisitor.cpp.

References m_exportedRootScope, m_rootScopeImports, m_usedTypes, and QQmlJSScope::resolveTypes().

+ Here is the call graph for this function:

◆ endVisit() [15/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::UiArrayBinding arrayBinding)
overrideprotected

Definition at line 2105 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::childScopes(), getScopeName(), i, leaveEnvironment(), QQmlJSScope::ListPropertyTarget, QQmlJSLogger::log(), m_bindings, m_currentScope, m_logger, m_pendingPropertyObjectBindings, QQmlJS::AST::UiArrayBinding::members, QQmlSA::QMLScope, qmlSyntax, and QQmlJSMetaPropertyBinding::setObject().

+ Here is the call graph for this function:

◆ endVisit() [16/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::UiInlineComponent component)
overrideprotected

Definition at line 1474 of file qqmljsimportvisitor.cpp.

References component(), QQmlJSLogger::log(), m_currentRootName, m_logger, m_nextIsInlineComponent, and qmlSyntax.

+ Here is the call graph for this function:

◆ endVisit() [17/22]

◆ endVisit() [18/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::UiObjectDefinition )
overrideprotected

Definition at line 1455 of file qqmljsimportvisitor.cpp.

References leaveEnvironment(), m_currentScope, m_rootScopeImports, m_usedTypes, and QQmlJSScope::resolveTypes().

+ Here is the call graph for this function:

◆ endVisit() [19/22]

◆ endVisit() [20/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::UiPublicMember publicMember)
overrideprotected

Definition at line 1599 of file qqmljsimportvisitor.cpp.

References forgetFunctionExpression(), m_currentScope, m_savedBindingOuterScope, QQmlJS::AST::UiPublicMember::name, and QStringView::toString().

+ Here is the call graph for this function:

◆ endVisit() [21/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::UiScriptBinding )
overrideprotected

◆ endVisit() [22/22]

void QQmlJSImportVisitor::endVisit ( QQmlJS::AST::WithStatement ast)
overrideprotected

Definition at line 2440 of file qqmljsimportvisitor.cpp.

References leaveEnvironment().

+ Here is the call graph for this function:

◆ enterEnvironment()

void QQmlJSImportVisitor::enterEnvironment ( QQmlJSScope::ScopeType  type,
const QString name,
const QQmlJS::SourceLocation location 
)
protected

Definition at line 141 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::create(), m_currentScope, and QQmlJSScope::reparent().

Referenced by enterEnvironmentNonUnique(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEnvironmentNonUnique()

bool QQmlJSImportVisitor::enterEnvironmentNonUnique ( QQmlJSScope::ScopeType  type,
const QString name,
const QQmlJS::SourceLocation location 
)
protected

Definition at line 150 of file qqmljsimportvisitor.cpp.

References QQmlSA::AttachedPropertyScope, QQmlJSScope::childScopes(), QSet< T >::end(), enterEnvironment(), QQmlSA::GroupedPropertyScope, it, m_currentScope, m_scopesByIrLocation, and Q_ASSERT.

Referenced by endVisit(), visit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flushPendingSignalParameters()

void QQmlJSImportVisitor::flushPendingSignalParameters ( )
protected

Definition at line 1204 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::JavaScriptIdentifier::Injected, QQmlJSScope::insertJSIdentifier(), m_currentScope, m_pendingSignalHandler, m_signalHandlers, and QQmlJSMetaSignalHandler::signalParameters.

Referenced by visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forgetFunctionExpression()

void QQmlJSImportVisitor::forgetFunctionExpression ( const QString name)
protected

Removes last FunctionOrExpressionIdentifier from m_functionStack, performing some checks on name.

Note
name must match the name added via addFunctionOrExpression().
See also
addFunctionOrExpression, synthesizeCompilationUnitRuntimeFunctionIndices

Definition at line 1250 of file qqmljsimportvisitor.cpp.

References m_functionStack, Q_ASSERT, and Q_UNUSED.

Referenced by endVisit(), endVisit(), and endVisit().

+ Here is the caller graph for this function:

◆ implicitImportDirectory()

QString QQmlJSImportVisitor::implicitImportDirectory ( const QString localFile,
QQmlJSResourceFileMapper mapper 
)
static

Definition at line 323 of file qqmljsimportvisitor.cpp.

References QFileInfo::canonicalPath(), QQmlJSResourceFileMapper::localFileFilter(), mapper, and QStringLiteral.

Referenced by QQmlJSLinter::lintFile(), and QQmlJSTypeReader::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importer() [1/2]

QQmlJSImporter * QQmlJSImportVisitor::importer ( )
inline

Definition at line 78 of file qqmljsimportvisitor_p.h.

Referenced by QQmlSA::PassManagerPrivate::registerPropertyPass(), QQmlSA::GenericPass::resolveBuiltinType(), and QQmlSA::GenericPass::resolveType().

+ Here is the caller graph for this function:

◆ importer() [2/2]

const QQmlJSImporter * QQmlJSImportVisitor::importer ( ) const
inline

Definition at line 79 of file qqmljsimportvisitor_p.h.

◆ imports()

QQmlJSImporter::ImportedTypes QQmlJSImportVisitor::imports ( ) const
inline

Definition at line 61 of file qqmljsimportvisitor_p.h.

Referenced by QQmlSA::PassManager::hasImportedModule(), QQmlJSTypeResolver::init(), and QQmlSA::GenericPass::resolveTypeInFileScope().

+ Here is the caller graph for this function:

◆ isImportPrefix()

bool QQmlJSImportVisitor::isImportPrefix ( QString  prefix) const
protected

Definition at line 1864 of file qqmljsimportvisitor.cpp.

References QString::front(), QString::isEmpty(), QQmlJSScope::ContextualTypes::isNullType(), QChar::isUpper(), and m_rootScopeImports.

Referenced by endVisit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTypeResolved() [1/2]

bool QQmlJSImportVisitor::isTypeResolved ( const QQmlJSScope::ConstPtr type)
protected

Definition at line 182 of file qqmljsimportvisitor.cpp.

References getScopeName(), isTypeResolved(), QQmlJSLogger::log(), m_logger, qmlUnresolvedType, and QStringLiteral.

+ Here is the call graph for this function:

◆ isTypeResolved() [2/2]

template<typename ErrorHandler >
bool QQmlJSImportVisitor::isTypeResolved ( const QQmlJSScope::ConstPtr type,
ErrorHandler  handle 
)
inlineprotected

Definition at line 238 of file qqmljsimportvisitor_p.h.

References QSet< T >::contains(), and QSet< T >::insert().

Referenced by isTypeResolved(), processDefaultProperties(), and processPropertyBindingObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEnvironment()

void QQmlJSImportVisitor::leaveEnvironment ( )
protected

Definition at line 177 of file qqmljsimportvisitor.cpp.

References m_currentScope, and QQmlJSScope::parentScope().

Referenced by endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), endVisit(), visit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ literalScopesToCheck()

QSet< QQmlJSScope::ConstPtr > QQmlJSImportVisitor::literalScopesToCheck ( ) const
inline

Definition at line 67 of file qqmljsimportvisitor_p.h.

Referenced by QQmlJSLiteralBindingCheck::run().

+ Here is the caller graph for this function:

◆ logger() [1/2]

QQmlJSLogger * QQmlJSImportVisitor::logger ( )
inline

Definition at line 59 of file qqmljsimportvisitor_p.h.

◆ logger() [2/2]

const QQmlJSLogger * QQmlJSImportVisitor::logger ( ) const
inline

Definition at line 58 of file qqmljsimportvisitor_p.h.

Referenced by QQmlSA::GenericPass::emitWarning(), QQmlSA::GenericPass::emitWarning(), QQmlJSTypeResolver::init(), QQmlSA::PassManager::isCategoryEnabled(), QQmlJSLiteralBindingCheck::run(), and QQmlSA::GenericPass::sourceCode().

+ Here is the caller graph for this function:

◆ parseAnnotations()

QVector< QQmlJSAnnotation > QQmlJSImportVisitor::parseAnnotations ( QQmlJS::AST::UiAnnotationList list)
protected

Definition at line 465 of file qqmljsimportvisitor.cpp.

References QList< T >::append(), QQmlJSAnnotation::bindings, bindingToVariant(), buildName(), QQmlJS::AST::UiAnnotation::initializer, item, list, QQmlJS::AST::UiObjectInitializer::members, QQmlJSAnnotation::name, and QQmlJS::AST::UiAnnotation::qualifiedTypeNameId.

Referenced by visit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseBindingExpression()

◆ populateRuntimeFunctionIndicesForDocument()

void QQmlJSImportVisitor::populateRuntimeFunctionIndicesForDocument ( ) const
protected

Definition at line 1315 of file qqmljsimportvisitor.cpp.

References m_exportedRootScope, synthesizeCompilationUnitRuntimeFunctionIndices(), and QQmlJSUtils::traverseFollowingQmlIrObjectStructure().

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processDefaultProperties()

void QQmlJSImportVisitor::processDefaultProperties ( )
protected

Definition at line 515 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::baseType(), QQmlJSScope::causesImplicitComponentWrapping(), QQmlJSScope::defaultPropertyName(), QString::isEmpty(), QQmlJSScope::isInCustomParserParent(), QQmlJSMetaProperty::isList(), isTypeResolved(), it, QQmlJSLogger::log(), m_logger, m_pendingDefaultProperties, QQmlJSScope::property(), qmlIncompatibleType, qmlMissingProperty, qmlNonListProperty, QStringLiteral, QSet< T >::size(), QQmlJSMetaProperty::type(), and QQmlJSMetaProperty::typeName().

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPropertyBindingObjects()

void QQmlJSImportVisitor::processPropertyBindingObjects ( )
protected

Definition at line 625 of file qqmljsimportvisitor.cpp.

References arg, QQmlJSScope::causesImplicitComponentWrapping(), QSet< T >::contains(), getScopeName(), QQmlJSScope::hasInterface(), QSet< T >::insert(), isTypeResolved(), QQmlJSLogger::log(), m_logger, m_pendingPropertyObjectBindings, property, qMakePair(), qmlDuplicatePropertyBinding, qmlIncompatibleType, qmlMissingProperty, QQmlSA::QMLScope, qmlUnresolvedType, QStringLiteral, and typeName.

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPropertyBindings()

void QQmlJSImportVisitor::processPropertyBindings ( )
protected

Definition at line 859 of file qqmljsimportvisitor.cpp.

References arg, QQmlJSUtils::didYouMean(), QQmlJSScope::hasProperty(), QQmlJSScope::isInCustomParserParent(), QDeferredSharedPointer< T >::isNull(), it, QQmlJSLogger::log(), m_logger, m_propertyBindings, QQmlJSScope::property(), property, qmlDeprecated, qmlMissingProperty, qmlMissingType, and QStringLiteral.

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPropertyTypes()

void QQmlJSImportVisitor::processPropertyTypes ( )
protected

Definition at line 606 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::findType(), QQmlJSLogger::log(), m_logger, m_pendingPropertyTypes, m_rootScopeImports, property, Q_ASSERT, qmlImport, and QStringLiteral.

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qmlTypes()

QList< QQmlJSScope::ConstPtr > QQmlJSImportVisitor::qmlTypes ( ) const
inline

Definition at line 68 of file qqmljsimportvisitor_p.h.

◆ result()

QQmlJSScope::Ptr QQmlJSImportVisitor::result ( ) const
inline

Definition at line 56 of file qqmljsimportvisitor_p.h.

◆ rootScopeIsValid()

bool QQmlJSImportVisitor::rootScopeIsValid ( ) const
inlineprotected

Definition at line 270 of file qqmljsimportvisitor_p.h.

References QQmlJS::SourceLocation::isValid(), and QQmlJSScope::sourceLocation().

Referenced by endVisit(), visit(), visit(), visit(), and visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scopeById()

QQmlJSScope::ConstPtr QQmlJSImportVisitor::scopeById ( const QString id,
const QQmlJSScope::ConstPtr current 
)
protected

◆ scopesBylocation()

QHash< QV4::CompiledData::Location, QQmlJSScope::ConstPtr > QQmlJSImportVisitor::scopesBylocation ( ) const
inline

Definition at line 69 of file qqmljsimportvisitor_p.h.

Referenced by QQmlJSTypeResolver::init().

+ Here is the caller graph for this function:

◆ setAllBindings()

void QQmlJSImportVisitor::setAllBindings ( )
protected

Definition at line 496 of file qqmljsimportvisitor.cpp.

References getScopeName(), it, QQmlJSLogger::log(), m_bindings, m_logger, qmlUnresolvedType, and QStringLiteral.

Referenced by endVisit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signalHandlers()

QHash< QQmlJS::SourceLocation, QQmlJSMetaSignalHandler > QQmlJSImportVisitor::signalHandlers ( ) const
inline

Definition at line 63 of file qqmljsimportvisitor_p.h.

Referenced by QQmlJSTypeResolver::init().

+ Here is the caller graph for this function:

◆ synthesizeCompilationUnitRuntimeFunctionIndices()

int QQmlJSImportVisitor::synthesizeCompilationUnitRuntimeFunctionIndices ( const QQmlJSScope::Ptr scope,
int  count 
) const
protected

Sets absolute runtime function indices for scope based on count (document-level variable). Returns count incremented by the number of runtime functions that the current scope has.

Note
Not all scopes are considered as the function is compatible with the compilation unit output. The runtime functions are only recorded for QmlIR::Object (even if they don't strictly belong to it). Thus, in QQmlJSScope terms, we are only interested in QML scopes, group and attached property scopes.

Definition at line 1271 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::addOwnRuntimeFunctionIndex(), QQmlSA::AttachedPropertyScope, QQmlSA::GroupedPropertyScope, it, m_functionsAndExpressions, m_innerFunctions, QQmlSA::QMLScope, and QQmlJSScope::scopeType().

Referenced by populateRuntimeFunctionIndicesForDocument().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ throwRecursionDepthError()

void QQmlJSImportVisitor::throwRecursionDepthError ( )
overrideprotectedvirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 2340 of file qqmljsimportvisitor.cpp.

References QQmlJSLogger::log(), m_logger, qmlRecursionDepthErrors, and QStringLiteral.

+ Here is the call graph for this function:

◆ visit() [1/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::Block ast)
overrideprotected

Definition at line 2382 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::Block::firstSourceLocation(), flushPendingSignalParameters(), QQmlJS::SourceLocation::isValid(), QQmlSA::JSLexicalScope, m_pendingSignalHandler, and QStringLiteral.

+ Here is the call graph for this function:

◆ visit() [2/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::CaseBlock ast)
overrideprotected

Definition at line 2398 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::CaseBlock::firstSourceLocation(), QQmlSA::JSLexicalScope, and QStringLiteral.

+ Here is the call graph for this function:

◆ visit() [3/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::Catch ast)
overrideprotected

Definition at line 2410 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::PatternElement::bindingIdentifier, enterEnvironment(), QQmlJS::AST::Catch::firstSourceLocation(), QQmlJSScope::insertJSIdentifier(), QQmlSA::JSLexicalScope, m_currentScope, QQmlJS::AST::Catch::patternElement, QStringLiteral, and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [4/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ClassDeclaration ast)
overrideprotected

Definition at line 2346 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::ClassExpression::firstSourceLocation(), QQmlSA::JSFunctionScope, QQmlJS::AST::ClassExpression::name, and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [5/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ClassExpression ast)
overrideprotected

Definition at line 1715 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::addOwnProperty(), enterEnvironment(), QQmlJS::AST::ClassExpression::firstSourceLocation(), QQmlSA::JSFunctionScope, m_currentScope, QQmlJS::AST::ClassExpression::name, QQmlJSMetaProperty::setPropertyName(), and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [6/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ESModule module)
overrideprotected

Definition at line 2637 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::ESModule::firstSourceLocation(), QQmlSA::JSLexicalScope, leaveEnvironment(), m_currentScope, Q_ASSERT, QStringLiteral, rootScopeIsValid(), and QQmlJSScope::setIsScript().

+ Here is the call graph for this function:

◆ visit() [7/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ExportDeclaration exp)
overrideprotected

Definition at line 2621 of file qqmljsimportvisitor.cpp.

References m_currentScope, m_exportedRootScope, m_globalScope, Q_ASSERT, and rootScopeIsValid().

+ Here is the call graph for this function:

◆ visit() [8/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ExpressionStatement ast)
overrideprotected

Definition at line 1324 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::ExpressionStatement::firstSourceLocation(), flushPendingSignalParameters(), QQmlJS::SourceLocation::isValid(), QQmlSA::JSFunctionScope, and m_pendingSignalHandler.

+ Here is the call graph for this function:

◆ visit() [9/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ForEachStatement ast)
overrideprotected

Definition at line 2370 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::ForEachStatement::firstSourceLocation(), QQmlSA::JSLexicalScope, and QStringLiteral.

+ Here is the call graph for this function:

◆ visit() [10/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::FormalParameterList fpl)
overrideprotected

Definition at line 2465 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::FormalParameterList::boundNames(), QQmlJSScope::insertJSIdentifier(), m_currentScope, QQmlJSScope::JavaScriptIdentifier::Parameter, and typeName.

+ Here is the call graph for this function:

◆ visit() [11/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::ForStatement ast)
overrideprotected

Definition at line 2358 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::ForStatement::firstSourceLocation(), QQmlSA::JSLexicalScope, and QStringLiteral.

+ Here is the call graph for this function:

◆ visit() [12/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::FunctionDeclaration fdecl)
overrideprotected

Definition at line 1703 of file qqmljsimportvisitor.cpp.

◆ visit() [13/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::FunctionExpression fexpr)
overrideprotected

Definition at line 1685 of file qqmljsimportvisitor.cpp.

◆ visit() [14/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::IdentifierExpression idexp)
overrideprotected

Definition at line 2685 of file qqmljsimportvisitor.cpp.

References QMultiHash< Key, T >::contains(), QSet< T >::insert(), m_importTypeLocationMap, m_usedTypes, QQmlJS::AST::IdentifierExpression::name, and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [15/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::PatternElement element)
overrideprotected

◆ visit() [16/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::Program program)
overrideprotected

Definition at line 2653 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::clone(), m_currentScope, m_exportedRootScope, m_globalScope, Q_ASSERT, rootScopeIsValid(), and QQmlJSScope::setIsScript().

+ Here is the call graph for this function:

◆ visit() [17/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::StringLiteral sl)
overrideprotected

Definition at line 1342 of file qqmljsimportvisitor.cpp.

References QQmlJS::SourceLocation::begin(), QString::chop(), QQmlJSLogger::code(), i, QQmlJS::SourceLocation::length, QQmlJS::AST::StringLiteral::literalToken, QQmlJSLogger::log(), m_logger, QString::mid(), qmlMultilineStrings, QStringLiteral, and QQmlJSFixSuggestion::setAutoApplicable().

+ Here is the call graph for this function:

◆ visit() [18/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiArrayBinding arrayBinding)
overrideprotected

Definition at line 2094 of file qqmljsimportvisitor.cpp.

References buildName(), enterEnvironment(), QQmlJS::AST::UiArrayBinding::firstSourceLocation(), m_currentScope, QQmlSA::QMLScope, QQmlJS::AST::UiArrayBinding::qualifiedId, and QQmlJSScope::setIsArrayScope().

+ Here is the call graph for this function:

◆ visit() [19/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiEnumDeclaration uied)
overrideprotected

◆ visit() [20/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiImport import)
overrideprotected

◆ visit() [21/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiInlineComponent component)
overrideprotected

Definition at line 1461 of file qqmljsimportvisitor.cpp.

References component(), QQmlJSLogger::log(), m_currentRootName, m_logger, m_nextIsInlineComponent, and qmlSyntax.

+ Here is the call graph for this function:

◆ visit() [22/31]

◆ visit() [23/31]

◆ visit() [24/31]

◆ visit() [25/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiProgram )
overrideprotected

Definition at line 391 of file qqmljsimportvisitor.cpp.

◆ visit() [26/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiPublicMember publicMember)
overrideprotected

Definition at line 1484 of file qqmljsimportvisitor.cpp.

References QQmlJSScope::addOwnMethod(), QQmlJS::AST::UiObjectMember::annotations, arg, buildName(), QHash< Key, T >::contains(), QMultiHash< Key, T >::contains(), enterEnvironment(), QQmlJS::AST::Node::firstSourceLocation(), QQmlJS::AST::UiQualifiedId::firstSourceLocation(), QQmlJS::AST::UiPublicMember::firstSourceLocation(), QQmlJSScope::ContextualTypes::hasType(), QSet< T >::insert(), QQmlJSScope::insertPropertyIdentifier(), internalName(), Invalid, QQmlJS::AST::UiPublicMember::isDefaultMember(), QString::isEmpty(), QQmlJSMetaProperty::isList(), QQmlJS::AST::UiPublicMember::isReadonly(), QQmlJS::AST::UiPublicMember::isRequired(), QQmlSA::JSFunctionScope, QQmlJSLogger::log(), m_currentScope, m_importTypeLocationMap, m_logger, m_pendingPropertyTypes, m_rootScopeImports, m_savedBindingOuterScope, m_usedTypes, QQmlJS::AST::UiPublicMember::memberType, method, QQmlJS::AST::UiPublicMember::name, QQmlJSScope::ownMethods(), QQmlJSScope::ownProperties(), QQmlJS::AST::UiPublicMember::parameters, parseAnnotations(), parseBindingExpression(), QString::prepend(), QQmlJS::AST::UiPublicMember::Property, QQmlJSMetaProperty::propertyName(), Q_ASSERT, qmlDuplicatedName, qmlSyntax, QStringLiteral, Script, QQmlJSMetaProperty::setAliasExpression(), QQmlJSMetaProperty::setAnnotations(), QQmlJSMetaProperty::setIndex(), QQmlJSMetaProperty::setIsList(), QQmlJSMetaProperty::setIsWritable(), QQmlJSScope::setOwnDefaultPropertyName(), QQmlJSScope::setPropertyLocallyRequired(), QQmlJSMetaProperty::setPropertyName(), QQmlJSMetaProperty::setType(), QQmlJSMetaProperty::setTypeName(), QQmlJS::AST::UiPublicMember::Signal, QHash< Key, T >::size(), QQmlJS::AST::UiPublicMember::statement, QStringView::toString(), QQmlJS::AST::UiPublicMember::type, QQmlJSScope::ContextualTypes::type(), QQmlJS::AST::UiPublicMember::typeModifier, and typeName.

+ Here is the call graph for this function:

◆ visit() [27/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiRequired required)
overrideprotected

Definition at line 1609 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::UiRequired::firstSourceLocation(), m_currentScope, m_requiredProperties, QQmlJS::AST::UiRequired::name, QQmlJSScope::setPropertyLocallyRequired(), and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [28/31]

◆ visit() [29/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::UiSourceElement srcElement)
overrideprotected

Definition at line 1697 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::UiObjectMember::annotations, m_pendingMethodAnnotations, and parseAnnotations().

+ Here is the call graph for this function:

◆ visit() [30/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::VariableDeclarationList vdl)
overrideprotected

Definition at line 2445 of file qqmljsimportvisitor.cpp.

References QQmlJS::AST::PatternElement::bindingIdentifier, QQmlJS::AST::VariableDeclarationList::declaration, QQmlJSScope::insertJSIdentifier(), m_currentScope, QQmlJS::AST::VariableDeclarationList::next, QStringView::toString(), QQmlJS::AST::PatternElement::typeAnnotation, and typeName.

+ Here is the call graph for this function:

◆ visit() [31/31]

bool QQmlJSImportVisitor::visit ( QQmlJS::AST::WithStatement withStatement)
overrideprotected

Definition at line 2427 of file qqmljsimportvisitor.cpp.

References enterEnvironment(), QQmlJS::AST::WithStatement::firstSourceLocation(), QQmlSA::JSLexicalScope, QQmlJSLogger::log(), m_logger, qmlWith, and QStringLiteral.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQmlJS::Dom::QQmlDomAstCreatorWithQQmlJSScope

Definition at line 359 of file qqmljsimportvisitor_p.h.

Member Data Documentation

◆ m_bindings

QList<UnfinishedBinding> QQmlJSImportVisitor::m_bindings
protected

◆ m_currentRootName

QQmlJSScope::InlineComponentOrDocumentRootName QQmlJSImportVisitor::m_currentRootName
protected
Initial value:

Definition at line 165 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), visit(), and visit().

◆ m_currentScope

◆ m_exportedRootScope

const QQmlJSScope::Ptr QQmlJSImportVisitor::m_exportedRootScope
protected

◆ m_functionsAndExpressions

QHash<QQmlJSScope::ConstPtr, QList<QString> > QQmlJSImportVisitor::m_functionsAndExpressions
protected

◆ m_functionStack

QStack<FunctionOrExpressionIdentifier> QQmlJSImportVisitor::m_functionStack
protected

◆ m_globalScope

QQmlJSScope::ConstPtr QQmlJSImportVisitor::m_globalScope
protected

Definition at line 170 of file qqmljsimportvisitor_p.h.

Referenced by checkRequiredProperties(), endVisit(), visit(), and visit().

◆ m_implicitImportDirectory

QString QQmlJSImportVisitor::m_implicitImportDirectory
protected

Definition at line 155 of file qqmljsimportvisitor_p.h.

Referenced by visit().

◆ m_importer

QQmlJSImporter* QQmlJSImportVisitor::m_importer = nullptr
protected

Definition at line 159 of file qqmljsimportvisitor_p.h.

Referenced by visit().

◆ m_importLocations

QSet<QQmlJS::SourceLocation> QQmlJSImportVisitor::m_importLocations
protected

Definition at line 184 of file qqmljsimportvisitor_p.h.

Referenced by endVisit().

◆ m_importStaticModuleLocationMap

QMultiHash<QString, QQmlJS::SourceLocation> QQmlJSImportVisitor::m_importStaticModuleLocationMap
protected

Definition at line 182 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), and visit().

◆ m_importTypeLocationMap

QMultiHash<QString, QQmlJS::SourceLocation> QQmlJSImportVisitor::m_importTypeLocationMap
protected

Definition at line 180 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), endVisit(), visit(), and visit().

◆ m_innerFunctions

QHash<FunctionOrExpressionIdentifier, int> QQmlJSImportVisitor::m_innerFunctions
protected

◆ m_literalScopesToCheck

QSet<QQmlJSScope::ConstPtr> QQmlJSImportVisitor::m_literalScopesToCheck
protected

Definition at line 332 of file qqmljsimportvisitor_p.h.

Referenced by parseBindingExpression().

◆ m_logger

◆ m_nextIsInlineComponent

bool QQmlJSImportVisitor::m_nextIsInlineComponent = false
protected

Definition at line 167 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), visit(), and visit().

◆ m_objectBindingScopes

QVector<QQmlJSScope::Ptr> QQmlJSImportVisitor::m_objectBindingScopes
protected

Definition at line 326 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), and visit().

◆ m_objectDefinitionScopes

QVector<QQmlJSScope::Ptr> QQmlJSImportVisitor::m_objectDefinitionScopes
protected

Definition at line 327 of file qqmljsimportvisitor_p.h.

Referenced by checkRequiredProperties(), endVisit(), and visit().

◆ m_pendingDefaultProperties

QHash<QQmlJSScope::Ptr, QVector<QQmlJSScope::Ptr> > QQmlJSImportVisitor::m_pendingDefaultProperties
protected

◆ m_pendingMethodAnnotations

QVector<QQmlJSAnnotation> QQmlJSImportVisitor::m_pendingMethodAnnotations
protected

Definition at line 278 of file qqmljsimportvisitor_p.h.

Referenced by visit().

◆ m_pendingPropertyObjectBindings

QVector<PendingPropertyObjectBinding> QQmlJSImportVisitor::m_pendingPropertyObjectBindings
protected

Definition at line 324 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), endVisit(), and processPropertyBindingObjects().

◆ m_pendingPropertyTypes

QVector<PendingPropertyType> QQmlJSImportVisitor::m_pendingPropertyTypes
protected

Definition at line 323 of file qqmljsimportvisitor_p.h.

Referenced by processPropertyTypes(), and visit().

◆ m_pendingSignalHandler

QQmlJS::SourceLocation QQmlJSImportVisitor::m_pendingSignalHandler
protected

Definition at line 333 of file qqmljsimportvisitor_p.h.

Referenced by flushPendingSignalParameters(), visit(), visit(), and visit().

◆ m_propertyBindings

QHash<QQmlJSScope::Ptr, QVector<WithVisibilityScope<QString> > > QQmlJSImportVisitor::m_propertyBindings
protected

Definition at line 329 of file qqmljsimportvisitor_p.h.

Referenced by processPropertyBindings(), and visit().

◆ m_qmldirFiles

QStringList QQmlJSImportVisitor::m_qmldirFiles
protected

Definition at line 156 of file qqmljsimportvisitor_p.h.

◆ m_qmlTypes

QList<QQmlJSScope::ConstPtr> QQmlJSImportVisitor::m_qmlTypes
protected

Definition at line 173 of file qqmljsimportvisitor_p.h.

Referenced by visit(), and visit().

◆ m_requiredProperties

QVector<RequiredProperty> QQmlJSImportVisitor::m_requiredProperties
protected

Definition at line 325 of file qqmljsimportvisitor_p.h.

Referenced by checkRequiredProperties(), and visit().

◆ m_rootIsSingleton

bool QQmlJSImportVisitor::m_rootIsSingleton = false
protected

Definition at line 168 of file qqmljsimportvisitor_p.h.

Referenced by visit(), and visit().

◆ m_rootScopeImports

◆ m_savedBindingOuterScope

QQmlJSScope::Ptr QQmlJSImportVisitor::m_savedBindingOuterScope
protected

Definition at line 169 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), endVisit(), visit(), and visit().

◆ m_scopesById

QQmlJSScopesById QQmlJSImportVisitor::m_scopesById
protected

Definition at line 171 of file qqmljsimportvisitor_p.h.

Referenced by checkRequiredProperties(), endVisit(), and visit().

◆ m_scopesByIrLocation

QHash<QV4::CompiledData::Location, QQmlJSScope::ConstPtr> QQmlJSImportVisitor::m_scopesByIrLocation
protected

Definition at line 177 of file qqmljsimportvisitor_p.h.

Referenced by enterEnvironmentNonUnique().

◆ m_signalHandlers

QHash<QQmlJS::SourceLocation, QQmlJSMetaSignalHandler> QQmlJSImportVisitor::m_signalHandlers
protected

Definition at line 331 of file qqmljsimportvisitor_p.h.

Referenced by flushPendingSignalParameters(), and visit().

◆ m_thisScriptBindingIsJavaScript

bool QQmlJSImportVisitor::m_thisScriptBindingIsJavaScript = false
protected

Definition at line 215 of file qqmljsimportvisitor_p.h.

Referenced by endVisit(), and visit().

◆ m_unresolvedTypes

QSet<QQmlJSScope::ConstPtr> QQmlJSImportVisitor::m_unresolvedTypes
protected

Definition at line 236 of file qqmljsimportvisitor_p.h.

◆ m_usedTypes

QSet<QString> QQmlJSImportVisitor::m_usedTypes
protected

The documentation for this class was generated from the following files: