|
DomType | kind () const override |
| QmlFile (const QString &filePath=QString(), const QString &code=QString(), const QDateTime &lastDataUpdate=QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC), int derivedFrom=0, RecoveryOption option=DisableParserRecovery) |
bool | iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override |
DomItem | field (const DomItem &self, QStringView name) const override |
std::shared_ptr< QmlFile > | makeCopy (const DomItem &self) const |
void | addError (const DomItem &self, ErrorMessage &&msg) override |
const QMultiMap< QString, QmlComponent > & | components () const & |
void | setComponents (const QMultiMap< QString, QmlComponent > &components) |
Path | addComponent (const QmlComponent &component, AddOption option=AddOption::Overwrite, QmlComponent **cPtr=nullptr) |
void | writeOut (const DomItem &self, OutWriter &lw) const override |
AST::UiProgram * | ast () const |
const QList< Import > & | imports () const & |
void | setImports (const QList< Import > &imports) |
Path | addImport (const Import &i) |
std::shared_ptr< QQmlJS::Engine > | engine () const |
RegionComments & | comments () |
std::shared_ptr< AstComments > | astComments () const |
void | setAstComments (const std::shared_ptr< AstComments > &comm) |
FileLocations::Tree | fileLocationsTree () const |
void | setFileLocationsTree (const FileLocations::Tree &v) |
const QList< Pragma > & | pragmas () const & |
void | setPragmas (QList< Pragma > pragmas) |
Path | addPragma (const Pragma &pragma) |
ImportScope & | importScope () |
const ImportScope & | importScope () const |
std::shared_ptr< QQmlJSTypeResolver > | typeResolver () const |
void | setTypeResolverWithDependencies (const std::shared_ptr< QQmlJSTypeResolver > &typeResolver, const QQmlJSTypeResolverDependencies &dependencies) |
DomCreationOption | creationOption () const |
QQmlJSScope::ConstPtr | handleForPopulation () const |
void | setHandleForPopulation (const QQmlJSScope::ConstPtr &scope) |
| ExternalOwningItem (const QString &filePath, const QDateTime &lastDataUpdateAt, const Path &pathFromTop, int derivedFrom=0, const QString &code=QString()) |
| ExternalOwningItem (const ExternalOwningItem &o)=default |
QString | canonicalFilePath (const DomItem &) const override |
QString | canonicalFilePath () const |
Path | canonicalPath (const DomItem &) const override |
Path | canonicalPath () const |
bool | iterateSubOwners (const DomItem &self, function_ref< bool(const DomItem &owner)> visitor) override |
bool | isValid () const |
void | setIsValid (bool val) |
const QString & | code () const |
| OwningItem (const OwningItem &o) |
| OwningItem (int derivedFrom=0) |
| OwningItem (int derivedFrom, const QDateTime &lastDataUpdateAt) |
| OwningItem (const OwningItem &&)=delete |
OwningItem & | operator= (const OwningItem &&)=delete |
std::shared_ptr< OwningItem > | makeCopy (const DomItem &self) const |
Path | pathFromOwner () const override final |
DomItem | containingObject (const DomItem &self) const override |
int | derivedFrom () const |
virtual int | revision () const |
QDateTime | createdAt () const |
virtual QDateTime | lastDataUpdateAt () const |
virtual void | refreshedDataAt (QDateTime tNew) |
virtual bool | frozen () const |
virtual bool | freeze () |
QDateTime | frozenAt () const |
void | addErrorLocal (ErrorMessage &&msg) |
void | clearErrors (const ErrorGroups &groups=ErrorGroups({})) |
bool | iterateErrors (const DomItem &self, function_ref< bool(const DomItem &source, const ErrorMessage &msg)> visitor, const Path &inPath=Path()) |
QMultiMap< Path, ErrorMessage > | localErrors () const |
QBasicMutex * | mutex () const |
virtual | ~DomBase ()=default |
DomBase * | domBase () |
const DomBase * | domBase () const |
virtual DomKind | domKind () const |
virtual void | dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const |
virtual quintptr | id () const |
QString | typeName () const |
virtual QList< QString > | fields (const DomItem &self) const |
virtual index_type | indexes (const DomItem &self) const |
virtual DomItem | index (const DomItem &self, index_type index) const |
virtual QSet< QString > const | keys (const DomItem &self) const |
virtual DomItem | key (const DomItem &self, const QString &name) const |
virtual QCborValue | value () const |
A QmlFile, when loaded in a DomEnvironment that has the DomCreationOption::WithSemanticAnalysis, will be lazily constructed.
That means that its member m_lazyMembers is uninitialized, and will only be populated when it is accessed (through a getter, a setter or the DomItem interface).
The reason for the laziness is that the qqmljsscopes are created lazily and at the same time as the Dom QmlFile representations. So instead of eagerly generating all qqmljsscopes when constructing the Dom, the QmlFile itself becomes lazy and will only be populated on demand at the same time as the corresponding qqmljsscopes.
The QDeferredFactory<QQmlJSScope> will, when the qqmljsscope is populated, take care of populating all fields of the QmlFile. Therefore, population of the QmlFile is done by populating the qqmljsscope.
Definition at line 323 of file qqmldomexternalitems_p.h.