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
QQmlTypeCompiler Struct Reference

#include <qqmltypecompiler_p.h>

+ Collaboration diagram for QQmlTypeCompiler:

Public Types

typedef QmlIR::Object CompiledObject
 
typedef QmlIR::Binding CompiledBinding
 
using ListPropertyAssignBehavior = QmlIR::Pragma::ListPropertyAssignBehaviorValue
 
using IdToObjectMap = QMap<int, int>
 

Public Member Functions

 QQmlTypeCompiler (QQmlEnginePrivate *engine, QQmlTypeData *typeData, QmlIR::Document *document, QV4::CompiledData::ResolvedTypeReferenceMap *resolvedTypeCache, const QV4::CompiledData::DependentTypesHasher &dependencyHasher)
 
const QmlIR::ObjectobjectAt (int index) const
 
QmlIR::ObjectobjectAt (int index)
 
int objectCount () const
 
QString stringAt (int idx) const
 
QmlIR::PoolList< QmlIR::Function >::Iterator objectFunctionsBegin (const QmlIR::Object *object) const
 
QmlIR::PoolList< QmlIR::Function >::Iterator objectFunctionsEnd (const QmlIR::Object *object) const
 
ListPropertyAssignBehavior listPropertyAssignBehavior () const
 
QQmlRefPointer< QV4::CompiledData::CompilationUnitcompile ()
 
QList< QQmlErrorcompilationErrors () const
 
void recordError (const QV4::CompiledData::Location &location, const QString &description)
 
void recordError (const QQmlJS::DiagnosticMessage &message)
 
void recordError (const QQmlError &e)
 
int registerString (const QString &str)
 
int registerConstant (QV4::ReturnedValue v)
 
const QV4::CompiledData::UnitqmlUnit () const
 
QUrl url () const
 
QQmlEnginePrivateenginePrivate () const
 
const QQmlImportsimports () const
 
QVector< QmlIR::Object * > * qmlObjects () const
 
QQmlPropertyCacheVectorpropertyCaches ()
 
const QQmlPropertyCacheVectorpropertyCaches () const
 
QQmlJS::MemoryPoolmemoryPool ()
 
QStringView newStringRef (const QString &string)
 
const QV4::Compiler::StringTableGeneratorstringPool () const
 
const QHash< int, QQmlCustomParser * > & customParserCache () const
 
QString bindingAsString (const QmlIR::Object *object, int scriptIndex) const
 
void addImport (const QString &module, const QString &qualifier, QTypeRevision version)
 
QV4::ResolvedTypeReferenceresolvedType (int id) const
 
QV4::ResolvedTypeReferenceresolvedType (QMetaType type) const
 
QQmlType qmlTypeForComponent (const QString &inlineComponentName=QString()) const
 

Public Attributes

QV4::CompiledData::ResolvedTypeReferenceMapresolvedTypes = nullptr
 

Detailed Description

Definition at line 42 of file qqmltypecompiler_p.h.

Member Typedef Documentation

◆ CompiledBinding

◆ CompiledObject

◆ IdToObjectMap

Definition at line 58 of file qqmltypecompiler_p.h.

◆ ListPropertyAssignBehavior

Constructor & Destructor Documentation

◆ QQmlTypeCompiler()

QQmlTypeCompiler::QQmlTypeCompiler ( QQmlEnginePrivate * engine,
QQmlTypeData * typeData,
QmlIR::Document * document,
QV4::CompiledData::ResolvedTypeReferenceMap * resolvedTypeCache,
const QV4::CompiledData::DependentTypesHasher & dependencyHasher )

Definition at line 27 of file qqmltypecompiler.cpp.

Member Function Documentation

◆ addImport()

void QQmlTypeCompiler::addImport ( const QString & module,
const QString & qualifier,
QTypeRevision version )

Definition at line 235 of file qqmltypecompiler.cpp.

References QList< T >::append(), QList< T >::at(), i, QV4::CompiledData::Import::ImportLibrary, QmlIR::Document::imports, memoryPool(), pool, registerString(), QList< T >::size(), and QV4::CompiledData::Import::type.

+ Here is the call graph for this function:

◆ bindingAsString()

QString QQmlTypeCompiler::bindingAsString ( const QmlIR::Object * object,
int scriptIndex ) const

Definition at line 230 of file qqmltypecompiler.cpp.

Referenced by QQmlScriptStringScanner::scan().

+ Here is the caller graph for this function:

◆ compilationErrors()

QList< QQmlError > QQmlTypeCompiler::compilationErrors ( ) const
inline

Definition at line 79 of file qqmltypecompiler_p.h.

◆ compile()

◆ customParserCache()

const QHash< int, QQmlCustomParser * > & QQmlTypeCompiler::customParserCache ( ) const
inline

Definition at line 99 of file qqmltypecompiler_p.h.

◆ enginePrivate()

QQmlEnginePrivate * QQmlTypeCompiler::enginePrivate ( ) const
inline

Definition at line 90 of file qqmltypecompiler_p.h.

References engine.

Referenced by compile().

+ Here is the caller graph for this function:

◆ imports()

const QQmlImports * QQmlTypeCompiler::imports ( ) const

Definition at line 195 of file qqmltypecompiler.cpp.

References QQmlTypeLoader::Blob::imports().

Referenced by compile().

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

◆ listPropertyAssignBehavior()

ListPropertyAssignBehavior QQmlTypeCompiler::listPropertyAssignBehavior ( ) const
inline

Definition at line 67 of file qqmltypecompiler_p.h.

References QmlIR::Pragma::ListPropertyAssignBehavior.

◆ memoryPool()

QQmlJS::MemoryPool * QQmlTypeCompiler::memoryPool ( )

Definition at line 215 of file qqmltypecompiler.cpp.

References QmlIR::Document::jsParserEngine, and QQmlJS::Engine::pool().

Referenced by addImport().

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

◆ newStringRef()

QStringView QQmlTypeCompiler::newStringRef ( const QString & string)

Definition at line 220 of file qqmltypecompiler.cpp.

References QmlIR::Document::jsParserEngine, and QQmlJS::Engine::newStringRef().

+ Here is the call graph for this function:

◆ objectAt() [1/2]

QmlIR::Object * QQmlTypeCompiler::objectAt ( int index)
inline

Definition at line 61 of file qqmltypecompiler_p.h.

◆ objectAt() [2/2]

const QmlIR::Object * QQmlTypeCompiler::objectAt ( int index) const
inline

Definition at line 60 of file qqmltypecompiler_p.h.

◆ objectCount()

int QQmlTypeCompiler::objectCount ( ) const
inline

Definition at line 62 of file qqmltypecompiler_p.h.

◆ objectFunctionsBegin()

QmlIR::PoolList< QmlIR::Function >::Iterator QQmlTypeCompiler::objectFunctionsBegin ( const QmlIR::Object * object) const
inline

Definition at line 64 of file qqmltypecompiler_p.h.

◆ objectFunctionsEnd()

QmlIR::PoolList< QmlIR::Function >::Iterator QQmlTypeCompiler::objectFunctionsEnd ( const QmlIR::Object * object) const
inline

Definition at line 65 of file qqmltypecompiler_p.h.

◆ propertyCaches() [1/2]

QQmlPropertyCacheVector * QQmlTypeCompiler::propertyCaches ( )

Definition at line 205 of file qqmltypecompiler.cpp.

◆ propertyCaches() [2/2]

const QQmlPropertyCacheVector * QQmlTypeCompiler::propertyCaches ( ) const

Definition at line 210 of file qqmltypecompiler.cpp.

◆ qmlObjects()

QVector< QmlIR::Object * > * QQmlTypeCompiler::qmlObjects ( ) const

Definition at line 200 of file qqmltypecompiler.cpp.

References QmlIR::Document::objects.

◆ qmlTypeForComponent()

QQmlType QQmlTypeCompiler::qmlTypeForComponent ( const QString & inlineComponentName = QString()) const

Definition at line 256 of file qqmltypecompiler.cpp.

References QQmlTypeData::qmlType().

+ Here is the call graph for this function:

◆ qmlUnit()

const QV4::CompiledData::Unit * QQmlTypeCompiler::qmlUnit ( ) const

Definition at line 190 of file qqmltypecompiler.cpp.

References QmlIR::Document::javaScriptCompilationUnit, and QV4::CompiledData::CompilationUnit::unitData().

+ Here is the call graph for this function:

◆ recordError() [1/3]

void QQmlTypeCompiler::recordError ( const QQmlError & e)

Definition at line 168 of file qqmltypecompiler.cpp.

References error, and url().

+ Here is the call graph for this function:

◆ recordError() [2/3]

void QQmlTypeCompiler::recordError ( const QQmlJS::DiagnosticMessage & message)

Definition at line 158 of file qqmltypecompiler.cpp.

References error, and url().

+ Here is the call graph for this function:

◆ recordError() [3/3]

void QQmlTypeCompiler::recordError ( const QV4::CompiledData::Location & location,
const QString & description )

Definition at line 148 of file qqmltypecompiler.cpp.

References error, and url().

Referenced by compile(), and QQmlCompilePass::recordError().

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

◆ registerConstant()

int QQmlTypeCompiler::registerConstant ( QV4::ReturnedValue v)

Definition at line 185 of file qqmltypecompiler.cpp.

References QmlIR::Document::jsGenerator, and QV4::Compiler::JSUnitGenerator::registerConstant().

+ Here is the call graph for this function:

◆ registerString()

int QQmlTypeCompiler::registerString ( const QString & str)

Definition at line 180 of file qqmltypecompiler.cpp.

References QmlIR::Document::jsGenerator, QV4::Compiler::JSUnitGenerator::registerString(), and str.

Referenced by addImport(), and QQmlScriptStringScanner::scan().

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

◆ resolvedType() [1/2]

QV4::ResolvedTypeReference * QQmlTypeCompiler::resolvedType ( int id) const
inline

Definition at line 105 of file qqmltypecompiler_p.h.

References resolvedTypes, and QHash< Key, T >::value().

Referenced by QQmlCompilePass::resolvedType().

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

◆ resolvedType() [2/2]

QV4::ResolvedTypeReference * QQmlTypeCompiler::resolvedType ( QMetaType type) const
inline

Definition at line 110 of file qqmltypecompiler_p.h.

References resolvedTypes.

◆ stringAt()

QString QQmlTypeCompiler::stringAt ( int idx) const

Definition at line 175 of file qqmltypecompiler.cpp.

References QmlIR::Document::stringAt().

Referenced by QQmlCompilePass::stringAt().

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

◆ stringPool()

const QV4::Compiler::StringTableGenerator * QQmlTypeCompiler::stringPool ( ) const

◆ url()

QUrl QQmlTypeCompiler::url ( ) const
inline

Definition at line 89 of file qqmltypecompiler_p.h.

References QQmlDataBlob::finalUrl().

Referenced by recordError(), recordError(), and recordError().

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

Member Data Documentation

◆ resolvedTypes

QV4::CompiledData::ResolvedTypeReferenceMap* QQmlTypeCompiler::resolvedTypes = nullptr

Definition at line 66 of file qqmltypecompiler_p.h.

Referenced by compile(), resolvedType(), and resolvedType().


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