![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Represents a consistent set of types organized in modules, it is the top level of the DOM. More...
#include <qqmldomtop_p.h>
Classes | |
| struct | LoadResult |
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(const DomItem &, const PathEls::PathComponent &, const DomItem &)> |
Static Public Member Functions | |
| static ErrorGroups | myErrors () |
| static std::shared_ptr< DomEnvironment > | create (const QStringList &loadPaths, Options options=Option::SingleThreaded, DomCreationOption creationOption=DomCreationOption::Default, const 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 (const DomItem &self) const override |
Friends | |
| class | RefCacheEntry |
Represents a consistent set of types organized in modules, it is the top level of the DOM.
The DomEnvironment keeps a pointer m_lastValidBase to the last used valid DomEnvironment in the commitToBase() method. This allows the qqmldomastcreator to commit lazily loaded dependencies to the valid environment used by qmlls.
Definition at line 626 of file qqmldomtop_p.h.
|
strong |
| Enumerator | |
|---|---|
| Default | |
| KeepValid | |
| Exported | |
| NoReload | |
| WeakLoad | |
| SingleThreaded | |
| NoDependencies | |
Definition at line 650 of file qqmldomtop_p.h.
|
explicit |
|
explicit |
|
delete |
| void QQmlJS::Dom::DomEnvironment::addAllLoadedCallback | ( | const DomItem & | self, |
| DomTop::Callback | c ) |
Definition at line 1503 of file qqmldomtop.cpp.
References QQmlJS::Dom::Path::Path().
Depending on the creation options, this function adds LoadInfo of the provided path
Definition at line 1123 of file qqmldomtop.cpp.
References addLoadInfo().
Referenced by addExternalItemInfo().
|
inline |
Definition at line 791 of file qqmldomtop_p.h.
References addDependenciesToLoad().
| void QQmlJS::Dom::DomEnvironment::addJsFile | ( | const std::shared_ptr< JsFile > & | file, |
| AddOption | option = AddOption::KeepExisting ) |
Definition at line 1294 of file qqmldomtop.cpp.
| void QQmlJS::Dom::DomEnvironment::addLoadInfo | ( | const DomItem & | self, |
| const std::shared_ptr< LoadInfo > & | loadInfo ) |
Enqueues path to the m_loadsWithWork (queue of the pending "load" jobs). In simpler words, schedule the load of the dependencies of the path from loadInfo.
Definition at line 1138 of file qqmldomtop.cpp.
References QQmlJS::Dom::DomItem::addError(), QQmlJS::Dom::LoadInfo::Done, QQmlJS::Dom::ErrorGroups::error(), and myErrors().
Referenced by addDependenciesToLoad().
| void QQmlJS::Dom::DomEnvironment::addQmlFile | ( | const std::shared_ptr< QmlFile > & | file, |
| AddOption | option = AddOption::KeepExisting ) |
Definition at line 1279 of file qqmldomtop.cpp.
References domCreationOption(), QQmlJS::Dom::Extended, and semanticAnalysis().
Definition at line 1458 of file qqmldomtop.cpp.
| std::shared_ptr< DomEnvironment > QQmlJS::Dom::DomEnvironment::base | ( | ) | const |
Definition at line 1469 of file qqmldomtop.cpp.
Referenced by commitToBase().
|
overridevirtual |
Implements QQmlJS::Dom::DomTop.
Definition at line 785 of file qqmldomtop.cpp.
References QQmlJS::Dom::Path::fromRoot().
|
overridevirtual |
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 154 of file qqmldomtop.cpp.
| void QQmlJS::Dom::DomEnvironment::clearReferenceCache | ( | ) |
Definition at line 1519 of file qqmldomtop.cpp.
| bool QQmlJS::Dom::DomEnvironment::commitToBase | ( | const DomItem & | self, |
| const std::shared_ptr< DomEnvironment > & | validEnv = nullptr ) |
Definition at line 1325 of file qqmldomtop.cpp.
References base().
|
static |
Definition at line 1259 of file qqmldomtop.cpp.
Definition at line 1492 of file qqmldomtop.cpp.
|
overrideprotectedvirtual |
Implements QQmlJS::Dom::OwningItem.
Definition at line 916 of file qqmldomtop.cpp.
Referenced by makeCopy().
|
inline |
Definition at line 826 of file qqmldomtop_p.h.
Referenced by addQmlFile().
|
finaloverridevirtual |
Reimplemented from QQmlJS::Dom::DomBase.
Definition at line 906 of file qqmldomtop.cpp.
| bool QQmlJS::Dom::DomEnvironment::finishLoadingDependencies | ( | int | waitMSec = 30000 | ) |
Definition at line 1430 of file qqmldomtop.cpp.
References QQmlJS::Dom::LoadInfo::Done, and loadPendingDependencies().
| bool QQmlJS::Dom::DomEnvironment::hasFile | ( | const QString & | filePath | ) | const |
Definition at line 927 of file qqmldomtop.cpp.
Definition at line 1498 of file qqmldomtop.cpp.
|
inline |
Definition at line 751 of file qqmldomtop_p.h.
References QQmlJS::Dom::BaseOnly.
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 790 of file qqmldomtop.cpp.
References universe().
| QSet< QString > QQmlJS::Dom::DomEnvironment::jsFilePaths | ( | const DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal ) const |
Definition at line 1109 of file qqmldomtop.cpp.
| std::shared_ptr< ExternalItemInfo< JsFile > > QQmlJS::Dom::DomEnvironment::jsFileWithPath | ( | const DomItem & | self, |
| const QString & | path, | ||
| EnvLookup | options = EnvLookup::Normal ) const |
Definition at line 1104 of file qqmldomtop.cpp.
|
overridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 780 of file qqmldomtop.cpp.
References kindValue.
| void QQmlJS::Dom::DomEnvironment::loadFile | ( | const FileToLoad & | file, |
| const Callback & | callback, | ||
| std::optional< DomType > | fileType = std::optional<DomType>(), | ||
| const ErrorHandler & | h = nullptr ) |
Definition at line 931 of file qqmldomtop.cpp.
Definition at line 1160 of file qqmldomtop.cpp.
Definition at line 1172 of file qqmldomtop.cpp.
Definition at line 1166 of file qqmldomtop.cpp.
| QStringList QQmlJS::Dom::DomEnvironment::loadPaths | ( | ) | const |
Definition at line 1486 of file qqmldomtop.cpp.
| void QQmlJS::Dom::DomEnvironment::loadPendingDependencies | ( | ) |
Definition at line 1386 of file qqmldomtop.cpp.
References QQmlJS::Dom::DomItem::addError(), QQmlJS::Dom::ErrorGroups::error(), and myErrors().
Referenced by finishLoadingDependencies().
| std::shared_ptr< DomEnvironment > QQmlJS::Dom::DomEnvironment::makeCopy | ( | const DomItem & | self | ) | const |
Definition at line 911 of file qqmldomtop.cpp.
References doCopy().
| QSet< int > QQmlJS::Dom::DomEnvironment::moduleIndexMajorVersions | ( | const DomItem & | self, |
| const QString & | uri, | ||
| EnvLookup | lookup = EnvLookup::Normal ) const |
| QSet< QString > QQmlJS::Dom::DomEnvironment::moduleIndexUris | ( | const DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal ) const |
|
static |
Definition at line 774 of file qqmldomtop.cpp.
Referenced by addLoadInfo(), QQmlJS::Dom::LoadInfo::advanceLoad(), QQmlJS::Dom::LoadInfo::doCopy(), QQmlJS::Dom::LoadInfo::finishedLoadingDep(), and loadPendingDependencies().
| DomEnvironment::Options QQmlJS::Dom::DomEnvironment::options | ( | ) | const |
Definition at line 1464 of file qqmldomtop.cpp.
Referenced by testing.tools.test_runner._TestCaseRunner::_NewImageArtifact(), testing.tools.test_runner._TestCaseRunner::_RegenerateIfNeeded(), testing.tools.test_runner.TestRunner::IsSkiaGoldEnabled(), testing.tools.test_runner._TestCaseRunner::TestPixel(), and testing.tools.test_runner._TestCaseRunner::TestText().
| void QQmlJS::Dom::DomEnvironment::populateFromQmlFile | ( | MutableDomItem && | qmlFile | ) |
Definition at line 1524 of file qqmldomtop.cpp.
References QQmlJS::Dom::CommentCollector::CommentCollector(), QQmlJS::Dom::CommentCollector::collectComments(), QQmlJS::Dom::Default, QQmlJS::Dom::Extended, and QQmlJS::Dom::Minimal.
| std::shared_ptr< ExternalItemInfoBase > QQmlJS::Dom::DomEnvironment::qmlDirWithPath | ( | const DomItem & | self, |
| const QString & | path, | ||
| EnvLookup | options = EnvLookup::Normal ) const |
| QSet< QString > QQmlJS::Dom::DomEnvironment::qmlFilePaths | ( | const DomItem & | self, |
| EnvLookup | lookup = EnvLookup::Normal ) const |
Definition at line 1093 of file qqmldomtop.cpp.
| std::shared_ptr< ExternalItemInfo< QmlFile > > QQmlJS::Dom::DomEnvironment::qmlFileWithPath | ( | const DomItem & | self, |
| const QString & | path, | ||
| EnvLookup | options = EnvLookup::Normal ) const |
Definition at line 1088 of file qqmldomtop.cpp.
Definition at line 1042 of file qqmldomtop.cpp.
| DomEnvironment::SemanticAnalysis QQmlJS::Dom::DomEnvironment::semanticAnalysis | ( | ) |
Do not call this method inside of DomEnvironment's constructor! It requires weak_from_this() that only works after the constructor call finished.
Definition at line 1195 of file qqmldomtop.cpp.
Referenced by addQmlFile().
| void QQmlJS::Dom::DomEnvironment::setLoadPaths | ( | const QStringList & | v | ) |
Definition at line 1474 of file qqmldomtop.cpp.
| void QQmlJS::Dom::DomEnvironment::setResourceFiles | ( | const QStringList & | v | ) |
Definition at line 1480 of file qqmldomtop.cpp.
| shared_ptr< DomUniverse > QQmlJS::Dom::DomEnvironment::universe | ( | ) | const |
Definition at line 1053 of file qqmldomtop.cpp.
Referenced by iterateDirectSubpaths().
|
friend |
Definition at line 829 of file qqmldomtop_p.h.
|
staticconstexpr |
Definition at line 663 of file qqmldomtop_p.h.
Referenced by kind().