![]() |
Qt 6.x
The Qt SDK
|
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 &)> |
Static Public Member Functions | |
| static ErrorGroups | myErrors () |
| static DomItem | create (QStringList loadPaths, Options options=Option::SingleThreaded, DomItem &universe=DomItem::empty) |
| static QList< Import > | defaultImplicitImports () |
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< OwningItem > | doCopy (DomItem &self) const override |
| virtual std::shared_ptr< OwningItem > | doCopy (DomItem &self) const =0 |
Friends | |
| class | RefCacheEntry |
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.
|
strong |
| Enumerator | |
|---|---|
| Default | |
| KeepValid | |
| Exported | |
| NoReload | |
| WeakLoad | |
| SingleThreaded | |
| NoDependencies | |
Definition at line 634 of file qqmldomtop_p.h.
|
explicit |
|
explicit |
|
delete |
| 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:| 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:| 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:| 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:| 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:| 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:| 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:Definition at line 2209 of file qqmldomtop.cpp.
References QQmlJS::Dom::OwningItem::mutex().
Here is the call graph for this function:| 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:
|
overridevirtual |
Implements QQmlJS::Dom::DomTop.
Definition at line 950 of file qqmldomtop.cpp.
|
virtual |
Implements QQmlJS::Dom::DomTop.
QQml::Dom::DomTop::loadFile.
| filePath | the file path to load |
| logicalPath | the path from the |
| callback | a callback called with an canonical path, the old value, and the current value. |
| loadOptions | are if force is true the file is always read |
Implements QQmlJS::Dom::OwningItem.
Definition at line 176 of file qqmldomtop.cpp.
| void QQmlJS::Dom::DomEnvironment::clearReferenceCache | ( | ) |
Definition at line 2275 of file qqmldomtop.cpp.
| 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:
|
static |
Definition at line 1966 of file qqmldomtop.cpp.
References loadPaths(), options(), and universe().
Here is the call graph for this function: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:
|
overrideprotectedvirtual |
Implements QQmlJS::Dom::OwningItem.
Definition at line 1174 of file qqmldomtop.cpp.
References m_options.
| 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:
|
finaloverridevirtual |
Reimplemented from QQmlJS::Dom::DomBase.
Definition at line 1164 of file qqmldomtop.cpp.
| 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:| QString QQmlJS::Dom::DomEnvironment::globalScopeName | ( | ) | const |
Definition at line 2243 of file qqmldomtop.cpp.
| 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:| 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.
Definition at line 2254 of file qqmldomtop.cpp.
|
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:| QSet< QString > QQmlJS::Dom::DomEnvironment::jsFilePaths | ( | DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal |
||
| ) | const |
Definition at line 1778 of file qqmldomtop.cpp.
| 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.
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 945 of file qqmldomtop.cpp.
| 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:| 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:Definition at line 1896 of file qqmldomtop.cpp.
References mutex.
Referenced by loadPendingDependencies().
Here is the caller graph for this function:Definition at line 1908 of file qqmldomtop.cpp.
Definition at line 1902 of file qqmldomtop.cpp.
References mutex.
Referenced by finishLoadingDependencies().
Here is the caller graph for this function:| 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:| 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: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:| std::shared_ptr< DomEnvironment > QQmlJS::Dom::DomEnvironment::makeCopy | ( | DomItem & | self | ) | const |
Definition at line 1169 of file qqmldomtop.cpp.
| 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:| QSet< QString > QQmlJS::Dom::DomEnvironment::moduleIndexUris | ( | DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal |
||
| ) | const |
Definition at line 1522 of file qqmldomtop.cpp.
| 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:| 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.
|
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:| 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:| QSet< QString > QQmlJS::Dom::DomEnvironment::qmlDirectoryPaths | ( | DomItem & | self, |
| EnvLookup | options = EnvLookup::Normal |
||
| ) | const |
Definition at line 1682 of file qqmldomtop.cpp.
| 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.
| QSet< QString > QQmlJS::Dom::DomEnvironment::qmldirFilePaths | ( | DomItem & | self, |
| EnvLookup | options = EnvLookup::Normal |
||
| ) | const |
Definition at line 1706 of file qqmldomtop.cpp.
| 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:| 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:| QSet< QString > QQmlJS::Dom::DomEnvironment::qmlDirPaths | ( | DomItem & | self, |
| EnvLookup | options = EnvLookup::Normal |
||
| ) | const |
Definition at line 1724 of file qqmldomtop.cpp.
| 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.
| QSet< QString > QQmlJS::Dom::DomEnvironment::qmlFilePaths | ( | DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal |
||
| ) | const |
Definition at line 1755 of file qqmldomtop.cpp.
| 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:| QSet< QString > QQmlJS::Dom::DomEnvironment::qmltypesFilePaths | ( | DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal |
||
| ) | const |
Definition at line 1801 of file qqmldomtop.cpp.
| 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.
Definition at line 1474 of file qqmldomtop.cpp.
References it, mutex, and QSet< T >::removeIf().
Here is the call graph for this function:| 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:| 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:
|
friend |
Definition at line 750 of file qqmldomtop_p.h.
|
staticconstexpr |
Definition at line 647 of file qqmldomtop_p.h.