![]() |
Qt 6.x
The Qt SDK
|
Represents a set of parsed/loaded modules libraries and a plugins. More...
#include <qqmldomtop_p.h>
Public Types | |
enum class | Option { Default , SingleThreaded } |
![]() | |
using | Callback = DomItem::Callback |
![]() | |
using | FilterT = function_ref< bool(DomItem &, const PathEls::PathComponent &, DomItem &)> |
Static Public Member Functions | |
static ErrorGroups | myErrors () |
static std::shared_ptr< DomUniverse > | guaranteeUniverse (std::shared_ptr< DomUniverse > univ) |
static DomItem | create (QString universeName, Options options=Option::SingleThreaded) |
![]() | |
static int | nextRevision () |
Static Public Attributes | |
static constexpr DomType | kindValue = DomType::DomUniverse |
Protected Member Functions | |
std::shared_ptr< OwningItem > | doCopy (DomItem &self) const override |
virtual std::shared_ptr< OwningItem > | doCopy (DomItem &self) const =0 |
Represents a set of parsed/loaded modules libraries and a plugins.
This can be used to share parsing and updates between several Dom models, and kickstart a model without reparsing everything.
The universe is peculiar, because stepping into it from an environment looses the connection with the environment.
This implementation is a placeholder, a later patch will introduce it.
Definition at line 196 of file qqmldomtop_p.h.
|
strong |
Enumerator | |
---|---|
Default | |
SingleThreaded |
Definition at line 204 of file qqmldomtop_p.h.
QQmlJS::Dom::DomUniverse::DomUniverse | ( | QString | universeName, |
Options | options = Option::SingleThreaded |
||
) |
Definition at line 124 of file qqmldomtop.cpp.
|
delete |
|
overridevirtual |
Implements QQmlJS::Dom::DomTop.
Definition at line 147 of file qqmldomtop.cpp.
References QQmlJS::Dom::Path::Root().
Referenced by execQueue().
|
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 |
Reimplemented from QQmlJS::Dom::DomTop.
Definition at line 176 of file qqmldomtop.cpp.
References QQmlJS::Dom::Path::Field(), map, qmlFilePaths(), and qmlFileWithPath().
|
static |
Definition at line 141 of file qqmldomtop.cpp.
References options().
|
overrideprotectedvirtual |
Implements QQmlJS::Dom::OwningItem.
Definition at line 211 of file qqmldomtop.cpp.
References QRegularExpression::anchoredPattern(), and QStringLiteral.
|
inline |
Definition at line 240 of file qqmldomtop_p.h.
References mutex.
void QQmlJS::Dom::DomUniverse::execQueue | ( | ) |
Definition at line 318 of file qqmldomtop.cpp.
References QQmlJS::Dom::DomItem::addError(), QList< T >::append(), arg, canonicalPath(), QFileDevice::close(), QQmlJS::Dom::DomItem::copy(), QQmlJS::Dom::createDom(), QDateTime::currentDateTimeUtc(), QString::data(), QDateTime::date(), QDir::entryList(), QFileDevice::error(), error, QQmlJS::Dom::ErrorGroups::error(), QIODevice::errorString(), file, QDir::Files, QQmlJS::Dom::ForceLoad, QDateTime::fromMSecsSinceEpoch(), QQmlJS::Dom::QmldirFile::fromPathAndCode(), QString::fromUtf8(), QQmlJS::Dom::ErrorMessage::handle(), QString::isEmpty(), QString::isNull(), QQmlJS::Dom::DomItem::iterateErrors(), QQmlJS::Dom::OwningItem::mutex(), myErrors(), QDir::Name, QQmlJS::Dom::DomEnvironment::NoDependencies, QDir::NoDotAndDotDot, now, QString::number(), QFile::open(), ptr(), Q_ASSERT, qCWarning, QQmlJS::Dom::QmlDirectory, QQmlJS::Dom::Paths::qmlDirectoryInfoPath(), QQmlJS::Dom::QmldirFile, QQmlJS::Dom::Paths::qmldirFileInfoPath(), QQmlJS::Dom::QmlFile, QQmlJS::Dom::Paths::qmlFileInfoPath(), QQmlJS::Dom::QmltypesFile, QQmlJS::Dom::Paths::qmltypesFileInfoPath(), QStringLiteral, QIODevice::readAll(), QIODeviceBase::ReadOnly, QString::split(), tr, and QTimeZone::UTC.
Referenced by loadFile().
Definition at line 254 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
Referenced by iterateDirectSubpaths().
|
inline |
Definition at line 234 of file qqmldomtop_p.h.
References mutex.
Referenced by iterateDirectSubpaths().
|
static |
Definition at line 128 of file qqmldomtop.cpp.
References next, and QString::number().
|
overridevirtual |
Reimplemented from QQmlJS::Dom::DomTop.
Definition at line 152 of file qqmldomtop.cpp.
References QQmlJS::Dom::Path::Field(), globalScopeNames(), globalScopeWithName(), QQmlJS::Dom::DomTop::iterateDirectSubpaths(), map, name(), options(), qmlDirectoryPaths(), qmlDirectoryWithPath(), qmldirFilePaths(), and qmldirFileWithPath().
Definition at line 314 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
|
inline |
Definition at line 309 of file qqmldomtop_p.h.
References mutex.
|
inlineoverridevirtual |
Implements QQmlJS::Dom::DomBase.
Definition at line 211 of file qqmldomtop_p.h.
void QQmlJS::Dom::DomUniverse::loadFile | ( | DomItem & | self, |
const FileToLoad & | file, | ||
Callback | callback, | ||
LoadOptions | loadOptions, | ||
std::optional< DomType > | fileType = std::optional<DomType>() |
||
) |
Definition at line 247 of file qqmldomtop.cpp.
References QDateTime::currentDateTimeUtc(), QQmlJS::Dom::domTypeToString(), QQmlJS::Dom::DomItem::empty, QQmlJS::Dom::ErrorGroups::error(), execQueue(), file, fileType(), QQmlJS::Dom::fileTypeForPath(), QQmlJS::Dom::OwningItem::mutex(), myErrors(), Q_ASSERT, QQmlJS::Dom::QmlDirectory, QQmlJS::Dom::QmldirFile, QQmlJS::Dom::QmlFile, QQmlJS::Dom::QmltypesFile, SingleThreaded, and tr.
|
inline |
Definition at line 223 of file qqmldomtop_p.h.
|
static |
Definition at line 118 of file qqmldomtop.cpp.
References NewErrorGroup.
Referenced by execQueue(), QQmlJS::Dom::fileTypeForPath(), and loadFile().
|
inline |
Definition at line 339 of file qqmldomtop_p.h.
Referenced by iterateDirectSubpaths().
|
inline |
Definition at line 342 of file qqmldomtop_p.h.
References m_options.
Referenced by create(), and iterateDirectSubpaths().
Definition at line 269 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
Referenced by iterateDirectSubpaths().
|
inline |
Definition at line 264 of file qqmldomtop_p.h.
References mutex.
Referenced by iterateDirectSubpaths().
Definition at line 284 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
Referenced by iterateDirectSubpaths().
|
inline |
Definition at line 279 of file qqmldomtop_p.h.
References mutex.
Referenced by iterateDirectSubpaths().
Definition at line 299 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
Referenced by canonicalPath().
|
inline |
Definition at line 294 of file qqmldomtop_p.h.
References mutex.
Referenced by canonicalPath().
Definition at line 329 of file qqmldomtop_p.h.
References QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), map, and mutex.
|
inline |
Definition at line 324 of file qqmldomtop_p.h.
References mutex.
|
inline |
Definition at line 345 of file qqmldomtop_p.h.
References mutex.
Definition at line 491 of file qqmldomtop.cpp.
References it, and QQmlJS::Dom::OwningItem::mutex().
|
staticconstexpr |
Definition at line 210 of file qqmldomtop_p.h.