Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlSA::PassManagerPrivate Class Reference

#include <qqmlsa_p.h>

+ Collaboration diagram for QQmlSA::PassManagerPrivate:

Public Member Functions

 PassManagerPrivate (QQmlJSImportVisitor *visitor, QQmlJSTypeResolver *resolver)
 
void registerElementPass (std::unique_ptr< ElementPass > pass)
 PassManager::registerElementPass registers ElementPass with the pass manager.
 
bool registerPropertyPass (std::shared_ptr< PropertyPass > pass, QAnyStringView moduleName, QAnyStringView typeName, QAnyStringView propertyName=QAnyStringView(), bool allowInheritance=true)
 
void analyze (const Element &root)
 
bool hasImportedModule (QAnyStringView name) const
 
QSet< PropertyPass * > findPropertyUsePasses (const QQmlSA::Element &element, const QString &propertyName)
 
void analyzeWrite (const QQmlSA::Element &element, QString propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)
 
void analyzeRead (const QQmlSA::Element &element, QString propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
 
void analyzeBinding (const QQmlSA::Element &element, const QQmlSA::Element &value, QQmlSA::SourceLocation location)
 
void addBindingSourceLocations (const QQmlSA::Element &element, const QQmlSA::Element &scope=QQmlSA::Element(), const QString prefix=QString(), bool isAttached=false)
 

Static Public Member Functions

static PassManagerPrivateget (PassManager *manager)
 
static const PassManagerPrivateget (const PassManager *manager)
 
static PassManagercreatePassManager (QQmlJSImportVisitor *visitor, QQmlJSTypeResolver *resolver)
 
static void deletePassManager (PassManager *q)
 
static QQmlJSImportVisitorvisitor (const QQmlSA::PassManager &)
 
static QQmlJSTypeResolverresolver (const QQmlSA::PassManager &)
 

Public Attributes

std::vector< std::shared_ptr< ElementPass > > m_elementPasses
 
std::multimap< QString, PropertyPassInfom_propertyPasses
 
std::unordered_map< quint32, BindingInfom_bindingsByLocation
 
QQmlJSImportVisitorm_visitor
 
QQmlJSTypeResolverm_typeResolver
 

Friends

class GenericPass
 
class QT_PREPEND_NAMESPACE (QQmlJSScope)
 

Detailed Description

Definition at line 180 of file qqmlsa_p.h.

Constructor & Destructor Documentation

◆ PassManagerPrivate()

QQmlSA::PassManagerPrivate::PassManagerPrivate ( QQmlJSImportVisitor * visitor,
QQmlJSTypeResolver * resolver )
inline

Definition at line 188 of file qqmlsa_p.h.

Member Function Documentation

◆ addBindingSourceLocations()

void QQmlSA::PassManagerPrivate::addBindingSourceLocations ( const QQmlSA::Element & element,
const QQmlSA::Element & scope = QQmlSA::Element(),
const QString prefix = QString(),
bool isAttached = false )

Definition at line 1156 of file qqmlsa.cpp.

References addBindingSourceLocations(), analyzeBinding(), QQmlSA::AttachedProperty, QQmlSA::GroupProperty, QQmlSA::Element::isNull(), m_bindingsByLocation, QQmlSA::Element::ownPropertyBindings(), QQmlSA::Script, and QQmlSA::Element::sourceLocation().

Referenced by addBindingSourceLocations(), and analyze().

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

◆ analyze()

void QQmlSA::PassManagerPrivate::analyze ( const Element & root)

Definition at line 1201 of file qqmlsa.cpp.

References addBindingSourceLocations(), QQmlSA::childScopesBegin(), QQmlSA::childScopesEnd(), QQmlJSScope::createQQmlSAElement(), it, m_elementPasses, and QQmlSA::QMLScope.

+ Here is the call graph for this function:

◆ analyzeBinding()

void QQmlSA::PassManagerPrivate::analyzeBinding ( const QQmlSA::Element & element,
const QQmlSA::Element & value,
QQmlSA::SourceLocation location )

Definition at line 1234 of file qqmlsa.cpp.

References QQmlSA::Element::baseType(), findPropertyUsePasses(), info, QQmlSA::Element::isNull(), and m_bindingsByLocation.

Referenced by addBindingSourceLocations().

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

◆ analyzeRead()

void QQmlSA::PassManagerPrivate::analyzeRead ( const QQmlSA::Element & element,
QString propertyName,
const QQmlSA::Element & readScope,
QQmlSA::SourceLocation location )

Definition at line 1227 of file qqmlsa.cpp.

References findPropertyUsePasses().

+ Here is the call graph for this function:

◆ analyzeWrite()

void QQmlSA::PassManagerPrivate::analyzeWrite ( const QQmlSA::Element & element,
QString propertyName,
const QQmlSA::Element & value,
const QQmlSA::Element & writeScope,
QQmlSA::SourceLocation location )

Definition at line 1219 of file qqmlsa.cpp.

References findPropertyUsePasses().

+ Here is the call graph for this function:

◆ createPassManager()

static PassManager * QQmlSA::PassManagerPrivate::createPassManager ( QQmlJSImportVisitor * visitor,
QQmlJSTypeResolver * resolver )
inlinestatic

Definition at line 195 of file qqmlsa_p.h.

Referenced by QQmlJSLinter::lintFile().

+ Here is the caller graph for this function:

◆ deletePassManager()

static void QQmlSA::PassManagerPrivate::deletePassManager ( PassManager * q)
inlinestatic

Definition at line 201 of file qqmlsa_p.h.

Referenced by QQmlJSLinter::lintFile().

+ Here is the caller graph for this function:

◆ findPropertyUsePasses()

QSet< PropertyPass * > QQmlSA::PassManagerPrivate::findPropertyUsePasses ( const QQmlSA::Element & element,
const QString & propertyName )

Definition at line 1297 of file qqmlsa.cpp.

References QSet< T >::contains(), QQmlJSScope::createQQmlSAElement(), QSet< T >::isEmpty(), it, QQmlSA::lookupName(), m_propertyPasses, Q_UNUSED, QQmlJSScope::scope(), QQmlJSUtils::searchBaseAndExtensionTypes(), and typeName.

Referenced by analyzeBinding(), analyzeRead(), and analyzeWrite().

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

◆ get() [1/2]

static const PassManagerPrivate * QQmlSA::PassManagerPrivate::get ( const PassManager * manager)
inlinestatic

Definition at line 194 of file qqmlsa_p.h.

References manager.

◆ get() [2/2]

static PassManagerPrivate * QQmlSA::PassManagerPrivate::get ( PassManager * manager)
inlinestatic

Definition at line 193 of file qqmlsa_p.h.

References manager.

◆ hasImportedModule()

bool QQmlSA::PassManagerPrivate::hasImportedModule ( QAnyStringView name) const

◆ registerElementPass()

void QQmlSA::PassManagerPrivate::registerElementPass ( std::unique_ptr< ElementPass > pass)

PassManager::registerElementPass registers ElementPass with the pass manager.

Parameters
passThe registered pass. Ownership is transferred to the pass manager.

Definition at line 1062 of file qqmlsa.cpp.

References m_elementPasses.

◆ registerPropertyPass()

bool QQmlSA::PassManagerPrivate::registerPropertyPass ( std::shared_ptr< PropertyPass > pass,
QAnyStringView moduleName,
QAnyStringView typeName,
QAnyStringView propertyName = QAnyStringView(),
bool allowInheritance = true )

Definition at line 1127 of file qqmlsa.cpp.

References QQmlJSScope::createQQmlSAElement(), QQmlJSImportVisitor::importer(), QString::insert(), QAnyStringView::isEmpty(), QQmlSA::lookupName(), m_propertyPasses, m_visitor, qWarning, QQmlSA::Register, QAnyStringView::toString(), and typeName.

+ Here is the call graph for this function:

◆ resolver()

QQmlJSTypeResolver * QQmlSA::PassManagerPrivate::resolver ( const QQmlSA::PassManager & manager)
static

Definition at line 1292 of file qqmlsa.cpp.

References manager.

Referenced by QQmlSA::GenericPass::resolveLiteralType().

+ Here is the caller graph for this function:

◆ visitor()

Friends And Related Symbol Documentation

◆ GenericPass

friend class GenericPass
friend

Definition at line 187 of file qqmlsa_p.h.

◆ QT_PREPEND_NAMESPACE

class QT_PREPEND_NAMESPACE ( QQmlJSScope )
friend

Member Data Documentation

◆ m_bindingsByLocation

std::unordered_map<quint32, BindingInfo> QQmlSA::PassManagerPrivate::m_bindingsByLocation

Definition at line 233 of file qqmlsa_p.h.

Referenced by addBindingSourceLocations(), and analyzeBinding().

◆ m_elementPasses

std::vector<std::shared_ptr<ElementPass> > QQmlSA::PassManagerPrivate::m_elementPasses

Definition at line 231 of file qqmlsa_p.h.

Referenced by analyze(), and registerElementPass().

◆ m_propertyPasses

std::multimap<QString, PropertyPassInfo> QQmlSA::PassManagerPrivate::m_propertyPasses

Definition at line 232 of file qqmlsa_p.h.

Referenced by findPropertyUsePasses(), and registerPropertyPass().

◆ m_typeResolver

QQmlJSTypeResolver* QQmlSA::PassManagerPrivate::m_typeResolver

Definition at line 235 of file qqmlsa_p.h.

◆ m_visitor

QQmlJSImportVisitor* QQmlSA::PassManagerPrivate::m_visitor

Definition at line 234 of file qqmlsa_p.h.

Referenced by registerPropertyPass().


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