Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJS::Dom::DomEnvironment Class Referencefinal

Represents a consistent set of types organized in modules, it is the top level of the DOM. More...

#include <qqmldomtop_p.h>

+ Inheritance diagram for QQmlJS::Dom::DomEnvironment:
+ Collaboration diagram for QQmlJS::Dom::DomEnvironment:

Public Types

enum class  Option {
  Default = 0x0 , KeepValid = 0x1 , Exported = 0x2 , NoReload = 0x4 ,
  WeakLoad = 0x8 , SingleThreaded = 0x10 , NoDependencies = 0x20
}
 
- Public Types inherited from QQmlJS::Dom::DomTop
using Callback = DomItem::Callback
 
- Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref< bool(DomItem &, const PathEls::PathComponent &, DomItem &)>
 

Public Member Functions

 Q_DECLARE_FLAGS (Options, Option)
 
DomType kind () const override
 
Path canonicalPath () const override
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
DomItem field (DomItem &self, QStringView name) const final override
 
std::shared_ptr< DomEnvironmentmakeCopy (DomItem &self) const
 
void loadFile (DomItem &self, FileToLoad file, Callback loadCallback, Callback directDepsCallback, Callback endCallback, LoadOptions loadOptions, std::optional< DomType > fileType=std::optional< DomType >(), ErrorHandler h=nullptr)
 
void loadModuleDependency (DomItem &self, QString uri, Version v, Callback loadCallback=nullptr, Callback endCallback=nullptr, ErrorHandler=nullptr)
 
void loadBuiltins (DomItem &self, Callback callback=nullptr, ErrorHandler h=nullptr)
 
void removePath (const QString &path)
 
std::shared_ptr< DomUniverseuniverse () const
 
QSet< QStringmoduleIndexUris (DomItem &self, EnvLookup lookup=EnvLookup::Normal) const
 
QSet< int > moduleIndexMajorVersions (DomItem &self, QString uri, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ModuleIndexmoduleIndexWithUri (DomItem &self, QString uri, int majorVersion, EnvLookup lookup, Changeable changeable, ErrorHandler errorHandler=nullptr)
 
std::shared_ptr< ModuleIndexmoduleIndexWithUri (DomItem &self, QString uri, int majorVersion, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< QmlDirectory > > qmlDirectoryWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringqmlDirectoryPaths (DomItem &self, EnvLookup options=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< QmldirFile > > qmldirFileWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringqmldirFilePaths (DomItem &self, EnvLookup options=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfoBaseqmlDirWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringqmlDirPaths (DomItem &self, EnvLookup options=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< QmlFile > > qmlFileWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringqmlFilePaths (DomItem &self, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< JsFile > > jsFileWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringjsFilePaths (DomItem &self, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< QmltypesFile > > qmltypesFileWithPath (DomItem &self, QString path, EnvLookup options=EnvLookup::Normal) const
 
QSet< QStringqmltypesFilePaths (DomItem &self, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< GlobalScope > > globalScopeWithName (DomItem &self, QString name, EnvLookup lookup=EnvLookup::Normal) const
 
std::shared_ptr< ExternalItemInfo< GlobalScope > > ensureGlobalScopeWithName (DomItem &self, QString name, EnvLookup lookup=EnvLookup::Normal)
 
QSet< QStringglobalScopeNames (DomItem &self, EnvLookup lookup=EnvLookup::Normal) const
 
 DomEnvironment (QStringList loadPaths, Options options=Option::SingleThreaded, std::shared_ptr< DomUniverse > universe=nullptr)
 
 DomEnvironment (std::shared_ptr< DomEnvironment > parent, QStringList loadPaths, Options options=Option::SingleThreaded)
 
 DomEnvironment (const DomEnvironment &o)=delete
 
std::shared_ptr< ExternalItemInfo< QmlFile > > addQmlFile (std::shared_ptr< QmlFile > file, AddOption option=AddOption::KeepExisting)
 
std::shared_ptr< ExternalItemInfo< QmlDirectory > > addQmlDirectory (std::shared_ptr< QmlDirectory > file, AddOption option=AddOption::KeepExisting)
 
std::shared_ptr< ExternalItemInfo< QmldirFile > > addQmldirFile (std::shared_ptr< QmldirFile > file, AddOption option=AddOption::KeepExisting)
 
std::shared_ptr< ExternalItemInfo< QmltypesFile > > addQmltypesFile (std::shared_ptr< QmltypesFile > file, AddOption option=AddOption::KeepExisting)
 
std::shared_ptr< ExternalItemInfo< JsFile > > addJsFile (std::shared_ptr< JsFile > file, AddOption option=AddOption::KeepExisting)
 
std::shared_ptr< ExternalItemInfo< GlobalScope > > addGlobalScope (std::shared_ptr< GlobalScope > file, AddOption option=AddOption::KeepExisting)
 
bool commitToBase (DomItem &self, std::shared_ptr< DomEnvironment > validEnv=nullptr)
 
void addLoadInfo (DomItem &self, std::shared_ptr< LoadInfo > loadInfo)
 
std::shared_ptr< LoadInfoloadInfo (Path path) const
 
QList< PathloadInfoPaths () const
 
QHash< Path, std::shared_ptr< LoadInfo > > loadInfos () const
 
void loadPendingDependencies (DomItem &self)
 
bool finishLoadingDependencies (DomItem &self, int waitMSec=30000)
 
void addWorkForLoadInfo (Path elementCanonicalPath)
 
Options options () const
 
std::shared_ptr< DomEnvironmentbase () const
 
QStringList loadPaths () const
 
QStringList qmldirFiles () const
 
QString globalScopeName () const
 
QList< ImportimplicitImports () const
 
void addAllLoadedCallback (DomItem &self, Callback c)
 
void clearReferenceCache ()
 
void setLoadPaths (const QStringList &v)
 
virtual Path canonicalPath () const=0
 
Path canonicalPath (DomItem &) const override
 QQml::Dom::DomTop::loadFile.
 
- Public Member Functions inherited from QQmlJS::Dom::DomTop
 DomTop (QMap< QString, OwnerT > extraOwningItems={}, int derivedFrom=0)
 
 DomTop (const DomTop &o)
 
virtual Path canonicalPath () const =0
 
Path canonicalPath (DomItem &) const override
 QQml::Dom::DomTop::loadFile.
 
DomItem containingObject (DomItem &) const override
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
template<typename T >
void setExtraOwningItem (QString fieldName, std::shared_ptr< T > item)
 
void clearExtraOwningItems ()
 
QMap< QString, OwnerTextraOwningItems () const
 
- Public Member Functions inherited from QQmlJS::Dom::OwningItem
 OwningItem (const OwningItem &o)
 
 OwningItem (int derivedFrom=0)
 
 OwningItem (int derivedFrom, QDateTime lastDataUpdateAt)
 
 OwningItem (const OwningItem &&)=delete
 
OwningItemoperator= (const OwningItem &&)=delete
 
Path canonicalPath (DomItem &self) const override=0
 
bool iterateDirectSubpaths (DomItem &self, DirectVisitor) override
 
std::shared_ptr< OwningItemmakeCopy (DomItem &self) const
 
Path pathFromOwner () const
 
Path pathFromOwner (DomItem &) const override final
 
DomItem containingObject (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
 
virtual void addError (DomItem &self, ErrorMessage msg)
 
void addErrorLocal (ErrorMessage msg)
 
void clearErrors (ErrorGroups groups=ErrorGroups({}))
 
bool iterateErrors (DomItem &self, function_ref< bool(DomItem source, ErrorMessage msg)> visitor, Path inPath=Path())
 
QMultiMap< Path, ErrorMessagelocalErrors () const
 
virtual bool iterateSubOwners (DomItem &self, function_ref< bool(DomItem &owner)> visitor)
 
QBasicMutexmutex () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
virtual DomType kind () const =0
 
virtual DomKind domKind () const
 
virtual Path pathFromOwner (DomItem &self) const =0
 
virtual Path canonicalPath (DomItem &self) const =0
 
virtual bool iterateDirectSubpaths (DomItem &self, DirectVisitor visitor)=0
 
bool iterateDirectSubpathsConst (DomItem &self, DirectVisitor) const
 
virtual DomItem containingObject (DomItem &self) const
 
virtual void dump (DomItem &, Sink sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (DomItem &self) const
 
virtual DomItem field (DomItem &self, QStringView name) const
 
virtual index_type indexes (DomItem &self) const
 
virtual DomItem index (DomItem &self, index_type index) const
 
virtual QSet< QString > const keys (DomItem &self) const
 
virtual DomItem key (DomItem &self, QString name) const
 
virtual QString canonicalFilePath (DomItem &self) const
 
virtual void writeOut (DomItem &self, OutWriter &lw) const
 
virtual QCborValue value () const
 

Static Public Member Functions

static ErrorGroups myErrors ()
 
static DomItem create (QStringList loadPaths, Options options=Option::SingleThreaded, DomItem &universe=DomItem::empty)
 
static QList< ImportdefaultImplicitImports ()
 
- Static Public Member Functions inherited from QQmlJS::Dom::OwningItem
static int nextRevision ()
 

Static Public Attributes

static constexpr DomType kindValue = DomType::DomEnvironment
 

Protected Member Functions

std::shared_ptr< OwningItemdoCopy (DomItem &self) const override
 
virtual std::shared_ptr< OwningItemdoCopy (DomItem &self) const =0
 

Friends

class RefCacheEntry
 

Detailed Description

Represents a consistent set of types organized in modules, it is the top level of the DOM.

Definition at line 626 of file qqmldomtop_p.h.

Member Enumeration Documentation

◆ Option

Enumerator
Default 
KeepValid 
Exported 
NoReload 
WeakLoad 
SingleThreaded 
NoDependencies 

Definition at line 634 of file qqmldomtop_p.h.

Constructor & Destructor Documentation

◆ DomEnvironment() [1/3]

QQmlJS::Dom::DomEnvironment::DomEnvironment ( QStringList  loadPaths,
Options  options = Option::SingleThreaded,
std::shared_ptr< DomUniverse universe = nullptr 
)
explicit

◆ DomEnvironment() [2/3]

QQmlJS::Dom::DomEnvironment::DomEnvironment ( std::shared_ptr< DomEnvironment parent,
QStringList  loadPaths,
Options  options = Option::SingleThreaded 
)
explicit

◆ DomEnvironment() [3/3]

QQmlJS::Dom::DomEnvironment::DomEnvironment ( const DomEnvironment o)
delete

Member Function Documentation

◆ addAllLoadedCallback()

void QQmlJS::Dom::DomEnvironment::addAllLoadedCallback ( DomItem self,
DomTop::Callback  c 
)

Definition at line 2259 of file qqmldomtop.cpp.

References QList< T >::append(), and QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

◆ addGlobalScope()

std::shared_ptr< ExternalItemInfo< GlobalScope > > QQmlJS::Dom::DomEnvironment::addGlobalScope ( std::shared_ptr< GlobalScope file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2046 of file qqmldomtop.cpp.

References QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addJsFile()

std::shared_ptr< ExternalItemInfo< JsFile > > QQmlJS::Dom::DomEnvironment::addJsFile ( std::shared_ptr< JsFile file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2038 of file qqmldomtop.cpp.

References file, QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addLoadInfo()

void QQmlJS::Dom::DomEnvironment::addLoadInfo ( DomItem self,
std::shared_ptr< LoadInfo loadInfo 
)

Definition at line 1874 of file qqmldomtop.cpp.

References arg, error, mutex, and tr.

◆ addQmlDirectory()

std::shared_ptr< ExternalItemInfo< QmlDirectory > > QQmlJS::Dom::DomEnvironment::addQmlDirectory ( std::shared_ptr< QmlDirectory file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2018 of file qqmldomtop.cpp.

References file, QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addQmldirFile()

std::shared_ptr< ExternalItemInfo< QmldirFile > > QQmlJS::Dom::DomEnvironment::addQmldirFile ( std::shared_ptr< QmldirFile file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2025 of file qqmldomtop.cpp.

References file, QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addQmlFile()

std::shared_ptr< ExternalItemInfo< QmlFile > > QQmlJS::Dom::DomEnvironment::addQmlFile ( std::shared_ptr< QmlFile file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2010 of file qqmldomtop.cpp.

References file, QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addQmltypesFile()

std::shared_ptr< ExternalItemInfo< QmltypesFile > > QQmlJS::Dom::DomEnvironment::addQmltypesFile ( std::shared_ptr< QmltypesFile file,
AddOption  option = AddOption::KeepExisting 
)

Definition at line 2032 of file qqmldomtop.cpp.

References file, QQmlJS::Dom::OwningItem::mutex(), and options().

+ Here is the call graph for this function:

◆ addWorkForLoadInfo()

void QQmlJS::Dom::DomEnvironment::addWorkForLoadInfo ( Path  elementCanonicalPath)

Definition at line 2209 of file qqmldomtop.cpp.

References QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

◆ base()

std::shared_ptr< DomEnvironment > QQmlJS::Dom::DomEnvironment::base ( ) const

Definition at line 2220 of file qqmldomtop.cpp.

Referenced by commitToBase(), and QQmlJS::Dom::envCallbackForFile().

+ Here is the caller graph for this function:

◆ canonicalPath() [1/3]

Path QQmlJS::Dom::DomEnvironment::canonicalPath ( ) const
overridevirtual

Implements QQmlJS::Dom::DomTop.

Definition at line 950 of file qqmldomtop.cpp.

◆ canonicalPath() [2/3]

virtual Path QQmlJS::Dom::DomTop::canonicalPath ( ) const
virtual

Implements QQmlJS::Dom::DomTop.

◆ canonicalPath() [3/3]

Path QQmlJS::Dom::DomTop::canonicalPath ( DomItem ) const
overridevirtual

QQml::Dom::DomTop::loadFile.

Parameters
filePaththe file path to load
logicalPaththe path from the
callbacka callback called with an canonical path, the old value, and the current value.
loadOptionsare if force is true the file is always read

Implements QQmlJS::Dom::OwningItem.

Definition at line 176 of file qqmldomtop.cpp.

◆ clearReferenceCache()

void QQmlJS::Dom::DomEnvironment::clearReferenceCache ( )

Definition at line 2275 of file qqmldomtop.cpp.

◆ commitToBase()

bool QQmlJS::Dom::DomEnvironment::commitToBase ( DomItem self,
std::shared_ptr< DomEnvironment validEnv = nullptr 
)

Definition at line 2052 of file qqmldomtop.cpp.

References base(), QMap< Key, T >::cbegin(), QSet< T >::cbegin(), QMap< Key, T >::cend(), QSet< T >::cend(), QMap< Key, T >::insert(), it, QQmlJS::Dom::OwningItem::mutex(), and QMap< Key, T >::value().

+ Here is the call graph for this function:

◆ create()

DomItem QQmlJS::Dom::DomEnvironment::create ( QStringList  loadPaths,
Options  options = Option::SingleThreaded,
DomItem universe = DomItem::empty 
)
static

Definition at line 1966 of file qqmldomtop.cpp.

References loadPaths(), options(), and universe().

+ Here is the call graph for this function:

◆ defaultImplicitImports()

QList< Import > QQmlJS::Dom::DomEnvironment::defaultImplicitImports ( )
static

Definition at line 2248 of file qqmldomtop.cpp.

References QQmlJS::Dom::QmlUri::fromUriString(), and QQmlJS::Dom::Import::fromUriString().

+ Here is the call graph for this function:

◆ doCopy()

std::shared_ptr< OwningItem > QQmlJS::Dom::DomEnvironment::doCopy ( DomItem self) const
overrideprotectedvirtual

Implements QQmlJS::Dom::OwningItem.

Definition at line 1174 of file qqmldomtop.cpp.

References m_options.

◆ ensureGlobalScopeWithName()

std::shared_ptr< ExternalItemInfo< GlobalScope > > QQmlJS::Dom::DomEnvironment::ensureGlobalScopeWithName ( DomItem self,
QString  name,
EnvLookup  lookup = EnvLookup::Normal 
)

Definition at line 1826 of file qqmldomtop.cpp.

References QQmlJS::Dom::DomItem::copy(), QQmlJS::Dom::DomItem::makeCopy(), mutex, and Q_ASSERT_X.

+ Here is the call graph for this function:

◆ field()

DomItem QQmlJS::Dom::DomEnvironment::field ( DomItem self,
QStringView  name 
) const
finaloverridevirtual

Reimplemented from QQmlJS::Dom::DomBase.

Definition at line 1164 of file qqmldomtop.cpp.

◆ finishLoadingDependencies()

bool QQmlJS::Dom::DomEnvironment::finishLoadingDependencies ( DomItem self,
int  waitMSec = 30000 
)

Definition at line 2181 of file qqmldomtop.cpp.

References QDateTime::addMSecs(), QSet< T >::cbegin(), QDateTime::currentDateTimeUtc(), QQmlJS::Dom::LoadInfo::Done, i, it, loadInfos(), loadPendingDependencies(), QDateTime::msecsTo(), and QThread::msleep().

+ Here is the call graph for this function:

◆ globalScopeName()

QString QQmlJS::Dom::DomEnvironment::globalScopeName ( ) const

Definition at line 2243 of file qqmldomtop.cpp.

◆ globalScopeNames()

QSet< QString > QQmlJS::Dom::DomEnvironment::globalScopeNames ( DomItem self,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1849 of file qqmldomtop.cpp.

References it, QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.

+ Here is the call graph for this function:

◆ globalScopeWithName()

std::shared_ptr< ExternalItemInfo< GlobalScope > > QQmlJS::Dom::DomEnvironment::globalScopeWithName ( DomItem self,
QString  name,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1812 of file qqmldomtop.cpp.

References mutex.

◆ implicitImports()

QList< Import > QQmlJS::Dom::DomEnvironment::implicitImports ( ) const

Definition at line 2254 of file qqmldomtop.cpp.

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::DomEnvironment::iterateDirectSubpaths ( DomItem self,
DirectVisitor  visitor 
)
overridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 955 of file qqmldomtop.cpp.

References base, QQmlJS::Dom::DomItem::copy(), i, QMap< Key, T >::key(), map, QString::number(), and QQmlJS::Dom::DomItem::owner().

+ Here is the call graph for this function:

◆ jsFilePaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::jsFilePaths ( DomItem self,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1778 of file qqmldomtop.cpp.

◆ jsFileWithPath()

std::shared_ptr< ExternalItemInfo< JsFile > > QQmlJS::Dom::DomEnvironment::jsFileWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1766 of file qqmldomtop.cpp.

References mutex.

◆ kind()

DomType QQmlJS::Dom::DomEnvironment::kind ( ) const
overridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 945 of file qqmldomtop.cpp.

◆ loadBuiltins()

void QQmlJS::Dom::DomEnvironment::loadBuiltins ( DomItem self,
Callback  callback = nullptr,
ErrorHandler  h = nullptr 
)

Definition at line 1457 of file qqmldomtop.cpp.

References QFileInfo::canonicalFilePath(), dir, QFileInfo::isFile(), and tr.

+ Here is the call graph for this function:

◆ loadFile()

void QQmlJS::Dom::DomEnvironment::loadFile ( DomItem self,
FileToLoad  file,
Callback  loadCallback,
Callback  directDepsCallback,
Callback  endCallback,
LoadOptions  loadOptions,
std::optional< DomType fileType = std::optional<DomType>(),
ErrorHandler  h = nullptr 
)

Definition at line 1185 of file qqmldomtop.cpp.

References arg, QDateTime::currentDateTimeUtc(), el, QSet< T >::end(), error, file, fileType(), QQmlJS::Dom::fileTypeForPath(), QSet< T >::find(), QSet< T >::insert(), it, mutex, now, QQmlJS::Dom::DomItem::path(), and tr.

+ Here is the call graph for this function:

◆ loadInfo()

std::shared_ptr< LoadInfo > QQmlJS::Dom::DomEnvironment::loadInfo ( Path  path) const

Definition at line 1896 of file qqmldomtop.cpp.

References mutex.

Referenced by loadPendingDependencies().

+ Here is the caller graph for this function:

◆ loadInfoPaths()

QList< Path > QQmlJS::Dom::DomEnvironment::loadInfoPaths ( ) const

Definition at line 1908 of file qqmldomtop.cpp.

◆ loadInfos()

QHash< Path, std::shared_ptr< LoadInfo > > QQmlJS::Dom::DomEnvironment::loadInfos ( ) const

Definition at line 1902 of file qqmldomtop.cpp.

References mutex.

Referenced by finishLoadingDependencies().

+ Here is the caller graph for this function:

◆ loadModuleDependency()

void QQmlJS::Dom::DomEnvironment::loadModuleDependency ( DomItem self,
QString  uri,
Version  v,
Callback  loadCallback = nullptr,
Callback  endCallback = nullptr,
ErrorHandler  errorHandler = nullptr 
)

Definition at line 1374 of file qqmldomtop.cpp.

References QRegularExpression::anchoredPattern(), arg, QRegularExpressionMatch::captured(), QString::contains(), dir, QDir::Dirs, el, QRegularExpression::escape(), QString::isEmpty(), QFileInfo::isFile(), QRegularExpression::match(), QDir::NoDotAndDotDot, QQmlJS::Dom::DomItem::path(), Q_ASSERT, QStringLiteral, QString::split(), QString::toInt(), tr, and Version.

+ Here is the call graph for this function:

◆ loadPaths()

QStringList QQmlJS::Dom::DomEnvironment::loadPaths ( ) const

Definition at line 2231 of file qqmldomtop.cpp.

References QQmlJS::Dom::OwningItem::mutex().

Referenced by create().

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

◆ loadPendingDependencies()

void QQmlJS::Dom::DomEnvironment::loadPendingDependencies ( DomItem self)

Definition at line 2138 of file qqmldomtop.cpp.

References cb, QList< T >::clear(), QQmlJS::Dom::ErrorGroups::error(), loadInfo(), QQmlJS::Dom::OwningItem::mutex(), myErrors(), Q_ASSERT, and qScopeGuard().

Referenced by finishLoadingDependencies().

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

◆ makeCopy()

std::shared_ptr< DomEnvironment > QQmlJS::Dom::DomEnvironment::makeCopy ( DomItem self) const

Definition at line 1169 of file qqmldomtop.cpp.

◆ moduleIndexMajorVersions()

QSet< int > QQmlJS::Dom::DomEnvironment::moduleIndexMajorVersions ( DomItem self,
QString  uri,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1530 of file qqmldomtop.cpp.

References it, QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, mutex, and QMap< Key, T >::value().

+ Here is the call graph for this function:

◆ moduleIndexUris()

QSet< QString > QQmlJS::Dom::DomEnvironment::moduleIndexUris ( DomItem self,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1522 of file qqmldomtop.cpp.

◆ moduleIndexWithUri() [1/2]

std::shared_ptr< ModuleIndex > QQmlJS::Dom::DomEnvironment::moduleIndexWithUri ( DomItem self,
QString  uri,
int  majorVersion,
EnvLookup  lookup,
Changeable  changeable,
ErrorHandler  errorHandler = nullptr 
)

Definition at line 1599 of file qqmldomtop.cpp.

References arg, QQmlJS::Dom::DomItem::canonicalPath(), QSet< T >::end(), QSet< T >::find(), QSet< T >::insert(), it, m_options, mutex, Q_ASSERT, and tr.

+ Here is the call graph for this function:

◆ moduleIndexWithUri() [2/2]

std::shared_ptr< ModuleIndex > QQmlJS::Dom::DomEnvironment::moduleIndexWithUri ( DomItem self,
QString  uri,
int  majorVersion,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1659 of file qqmldomtop.cpp.

◆ myErrors()

ErrorGroups QQmlJS::Dom::DomEnvironment::myErrors ( )
static

Definition at line 940 of file qqmldomtop.cpp.

References NewErrorGroup.

Referenced by QQmlJS::Dom::LoadInfo::advanceLoad(), QQmlJS::Dom::LoadInfo::doCopy(), QQmlJS::Dom::LoadInfo::finishedLoadingDep(), and loadPendingDependencies().

+ Here is the caller graph for this function:

◆ options()

DomEnvironment::Options QQmlJS::Dom::DomEnvironment::options ( ) const

Definition at line 2215 of file qqmldomtop.cpp.

Referenced by addGlobalScope(), addJsFile(), addQmlDirectory(), addQmldirFile(), addQmlFile(), addQmltypesFile(), and create().

+ Here is the caller graph for this function:

◆ Q_DECLARE_FLAGS()

QQmlJS::Dom::DomEnvironment::Q_DECLARE_FLAGS ( Options  ,
Option   
)

◆ qmlDirectoryPaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::qmlDirectoryPaths ( DomItem self,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1682 of file qqmldomtop.cpp.

◆ qmlDirectoryWithPath()

std::shared_ptr< ExternalItemInfo< QmlDirectory > > QQmlJS::Dom::DomEnvironment::qmlDirectoryWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1669 of file qqmldomtop.cpp.

References mutex.

◆ qmldirFilePaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::qmldirFilePaths ( DomItem self,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1706 of file qqmldomtop.cpp.

◆ qmldirFiles()

QStringList QQmlJS::Dom::DomEnvironment::qmldirFiles ( ) const

Definition at line 2237 of file qqmldomtop.cpp.

References QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

◆ qmldirFileWithPath()

std::shared_ptr< ExternalItemInfo< QmldirFile > > QQmlJS::Dom::DomEnvironment::qmldirFileWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1693 of file qqmldomtop.cpp.

References QSet< T >::end(), QSet< T >::find(), it, and mutex.

+ Here is the call graph for this function:

◆ qmlDirPaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::qmlDirPaths ( DomItem self,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1724 of file qqmldomtop.cpp.

References arg, and tr.

◆ qmlDirWithPath()

std::shared_ptr< ExternalItemInfoBase > QQmlJS::Dom::DomEnvironment::qmlDirWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1716 of file qqmldomtop.cpp.

◆ qmlFilePaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::qmlFilePaths ( DomItem self,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1755 of file qqmldomtop.cpp.

◆ qmlFileWithPath()

std::shared_ptr< ExternalItemInfo< QmlFile > > QQmlJS::Dom::DomEnvironment::qmlFileWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1742 of file qqmldomtop.cpp.

References QSet< T >::end(), QSet< T >::find(), it, and mutex.

+ Here is the call graph for this function:

◆ qmltypesFilePaths()

QSet< QString > QQmlJS::Dom::DomEnvironment::qmltypesFilePaths ( DomItem self,
EnvLookup  lookup = EnvLookup::Normal 
) const

Definition at line 1801 of file qqmldomtop.cpp.

◆ qmltypesFileWithPath()

std::shared_ptr< ExternalItemInfo< QmltypesFile > > QQmlJS::Dom::DomEnvironment::qmltypesFileWithPath ( DomItem self,
QString  path,
EnvLookup  options = EnvLookup::Normal 
) const

Definition at line 1789 of file qqmldomtop.cpp.

References mutex.

◆ removePath()

void QQmlJS::Dom::DomEnvironment::removePath ( const QString path)

Definition at line 1474 of file qqmldomtop.cpp.

References it, mutex, and QSet< T >::removeIf().

+ Here is the call graph for this function:

◆ setLoadPaths()

void QQmlJS::Dom::DomEnvironment::setLoadPaths ( const QStringList v)

Definition at line 2225 of file qqmldomtop.cpp.

References QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

◆ universe()

shared_ptr< DomUniverse > QQmlJS::Dom::DomEnvironment::universe ( ) const

Definition at line 1488 of file qqmldomtop.cpp.

Referenced by create().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ RefCacheEntry

friend class RefCacheEntry
friend

Definition at line 750 of file qqmldomtop_p.h.

Member Data Documentation

◆ kindValue

constexpr DomType QQmlJS::Dom::DomEnvironment::kindValue = DomType::DomEnvironment
staticconstexpr

Definition at line 647 of file qqmldomtop_p.h.


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