5#ifndef QQMLTYPECOMPILER_P_H
6#define QQMLTYPECOMPILER_P_H
22#include <private/qqmltypeloader_p.h>
23#include <private/qqmlirbuilder_p.h>
24#include <private/qqmlpropertyresolver_p.h>
25#include <private/qqmlpropertycachecreator_p.h>
77 bool objectIsComponent(
int index)
const {
return document->objects.at(index)->isComponent; }
84 for (
const QmlIR::Pragma *pragma : std::as_const(document->pragmas)) {
85 if (pragma->type == QmlIR::Pragma::ListPropertyAssignBehavior)
86 return pragma->listPropertyAssignBehavior;
88 return ListPropertyAssignBehavior::Append;
96 void recordError(
const QQmlJS::DiagnosticMessage &message);
103 QUrl url()
const {
return typeData->finalUrl(); }
105 const QQmlImports *
imports()
const;
121 return resolvedTypes->value(id);
126 for (QV4::ResolvedTypeReference *ref : std::as_const(*resolvedTypes)) {
127 if (ref->type().typeId() == type)
136 QV4::CompiledData::CompilationUnit *unit, QQmlTypeLoader *typeLoader,
137 const QQmlImports *imports);
140 void copyComponentsAndIds();
142 QList<QQmlError> errors;
143 QQmlTypeLoader *loader;
144 const QV4::CompiledData::DependentTypesHasher &dependencyHasher;
145 QmlIR::Document *document;
147 QHash<
int, QQmlCustomParser*> customParsers;
150 QQmlPropertyCacheVector m_propertyCaches;
152 QQmlTypeData *typeData;
165 {
return compiler->resolvedType(id); }
178 void scanObjectRecursively(
int objectIndex,
bool annotateScriptBindings =
false);
180 const QList<QmlIR::Object*> &qmlObjects;
181 const QHash<
int, QQmlCustomParser*> &customParsers;
192 const QList<QmlIR::Object*> &qmlObjects;
193 const QQmlPropertyCacheVector *
const propertyCaches;
void annotateBindingsWithScriptStrings()
QQmlCustomParserScriptIndexer(QQmlTypeCompiler *typeCompiler)
friend class QQmlEnginePrivate
QQmlScriptStringScanner(QQmlTypeCompiler *typeCompiler)
Combined button and popup list for selecting options.
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
static bool resolveDeepAlias(QQmlTypeCompiler *compiler, const QmlIR::Object *targetObject, QStringView property, QStringView subProperty, QQmlPropertyIndex &propIdx, QMetaType targetPropertyType, const QQmlPropertyCacheVector *propertyCaches, const QMap< int, int > &idToObjectIndex)
void recordError(const QV4::CompiledData::Location &location, const QString &description) const
QQmlCompilePass(QQmlTypeCompiler *typeCompiler)
QV4::ResolvedTypeReference * resolvedType(int id) const
QQmlTypeCompiler * compiler
QString stringAt(int idx) const
const QmlIR::Object * objectAt(int index) const
int implicitComponentForObject(int childIndex) const
QmlIR::Object CompiledObject
void recordError(const QQmlJS::DiagnosticMessage &message)
QQmlTypeLoader * typeLoader() const
static QList< QQmlError > computeRuntimeData(QV4::CompiledData::CompilationUnit *unit, QQmlTypeLoader *typeLoader, const QQmlImports *imports)
QV4::ResolvedTypeReference * resolvedType(int id) const
QList< QQmlError > compilationErrors() const
const QHash< int, QQmlCustomParser * > & customParserCache() const
const QV4::CompiledData::Unit * qmlUnit() const
QmlIR::Object * objectAt(int index)
QQmlType qmlTypeForComponent(const QString &inlineComponentName=QString()) const
QList< QmlIR::Object * > * qmlObjects() const
QQmlPropertyCacheVector * propertyCaches()
bool objectIsComponent(int index) const
QQmlJS::MemoryPool * memoryPool()
void recordError(const QQmlError &e)
QString bindingAsString(const QmlIR::Object *object, int scriptIndex) const
ListPropertyAssignBehavior listPropertyAssignBehavior() const
const QQmlPropertyCacheVector * propertyCaches() const
int registerString(const QString &str)
const QV4::Compiler::StringTableGenerator * stringPool() const
void recordError(const QV4::CompiledData::Location &location, const QString &description)
QStringView newStringRef(const QString &string)
int resolvedIndex(int index) const
QmlIR::Binding CompiledBinding
void addImport(const QString &module, const QString &qualifier, QTypeRevision version)
QQmlRefPointer< QV4::CompiledData::CompilationUnit > compile()
QString stringAt(int idx) const
const QQmlImports * imports() const