Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlJS::Dom::ModuleIndex Class Referencefinal

#include <qqmldommoduleindex_p.h>

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

Public Types

enum class  Status { NotLoaded , Loading , Loaded }
 
- Public Types inherited from QQmlJS::Dom::DomBase
using FilterT = function_ref<bool(const DomItem &, const PathEls::PathComponent &, const DomItem &)>
 

Public Member Functions

DomType kind () const override
 
 ModuleIndex (const QString &uri, int majorVersion, int derivedFrom=0, const QDateTime &lastDataUpdateAt=QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC))
 
 ModuleIndex (const ModuleIndex &o)
 
 ~ModuleIndex ()
 
std::shared_ptr< ModuleIndexmakeCopy (const DomItem &self) const
 
Path canonicalPath (const DomItem &) const override
 
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor visitor) const override
 
QSet< QStringexportNames (const DomItem &self) const
 
QList< DomItemexportsWithNameAndMinorVersion (const DomItem &self, const QString &name, int minorVersion) const
 
QString uri () const
 
int majorVersion () const
 
QList< Pathsources () const
 
QList< int > minorVersions () const
 
ModuleScopeensureMinorVersion (int minorVersion)
 
void mergeWith (const std::shared_ptr< ModuleIndex > &o)
 
void addQmltypeFilePath (const Path &p)
 
QList< PathqmldirsToLoad (const DomItem &self)
 
QList< PathqmltypesFilesPaths () const
 
QList< PathqmldirPaths () const
 
QList< PathdirectoryPaths () const
 
QList< DomItemautoExports (const DomItem &self) const
 
- Public Member Functions inherited from QQmlJS::Dom::OwningItem
 OwningItem (const OwningItem &o)
 
 OwningItem (int derivedFrom=0)
 
 OwningItem (int derivedFrom, const QDateTime &lastDataUpdateAt)
 
 OwningItem (const OwningItem &&)=delete
 
OwningItemoperator= (const OwningItem &&)=delete
 
bool iterateDirectSubpaths (const DomItem &self, DirectVisitor) const override
 
std::shared_ptr< OwningItemmakeCopy (const DomItem &self) const
 
Path pathFromOwner () const
 
Path pathFromOwner (const DomItem &) 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
 
virtual void addError (const DomItem &self, ErrorMessage &&msg)
 
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, ErrorMessagelocalErrors () const
 
virtual bool iterateSubOwners (const DomItem &self, function_ref< bool(const DomItem &owner)> visitor)
 
QBasicMutexmutex () const
 
- Public Member Functions inherited from QQmlJS::Dom::DomBase
virtual ~DomBase ()=default
 
DomBasedomBase ()
 
const DomBasedomBase () const
 
virtual DomKind domKind () const
 
bool iterateDirectSubpathsConst (const DomItem &self, DirectVisitor) const
 
virtual void dump (const DomItem &, const Sink &sink, int indent, FilterT filter) const
 
virtual quintptr id () const
 
QString typeName () const
 
virtual QList< QStringfields (const DomItem &self) const
 
virtual DomItem field (const DomItem &self, QStringView name) 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 QString canonicalFilePath (const DomItem &self) const
 
virtual void writeOut (const DomItem &self, OutWriter &lw) const
 
virtual QCborValue value () const
 

Static Public Attributes

static constexpr DomType kindValue = DomType::ModuleIndex
 

Protected Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from QQmlJS::Dom::OwningItem
static int nextRevision ()
 

Detailed Description

Definition at line 52 of file qqmldommoduleindex_p.h.

Member Enumeration Documentation

◆ Status

Enumerator
NotLoaded 
Loading 
Loaded 

Definition at line 60 of file qqmldommoduleindex_p.h.

Constructor & Destructor Documentation

◆ ModuleIndex() [1/2]

QQmlJS::Dom::ModuleIndex::ModuleIndex ( const QString & uri,
int majorVersion,
int derivedFrom = 0,
const QDateTime & lastDataUpdateAt = QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC) )
inline

Definition at line 64 of file qqmldommoduleindex_p.h.

◆ ModuleIndex() [2/2]

QQmlJS::Dom::ModuleIndex::ModuleIndex ( const ModuleIndex & o)

Definition at line 82 of file qqmldommoduleindex.cpp.

References QSet< T >::begin(), ensureMinorVersion(), it, and o.

+ Here is the call graph for this function:

◆ ~ModuleIndex()

QQmlJS::Dom::ModuleIndex::~ModuleIndex ( )

Definition at line 101 of file qqmldommoduleindex.cpp.

References QSet< T >::begin(), it, and QQmlJS::Dom::OwningItem::mutex().

+ Here is the call graph for this function:

Member Function Documentation

◆ addQmltypeFilePath()

void QQmlJS::Dom::ModuleIndex::addQmltypeFilePath ( const Path & p)
inline

Definition at line 103 of file qqmldommoduleindex_p.h.

References mutex.

◆ autoExports()

QList< DomItem > QQmlJS::Dom::ModuleIndex::autoExports ( const DomItem & self) const

Definition at line 165 of file qqmldommoduleindex.cpp.

References QQmlJS::Dom::RefCacheEntry::addForPath(), QQmlJS::Dom::RefCacheEntry::All, QString::append(), autoExports(), QQmlJS::Dom::RefCacheEntry::cached, canonicalPath(), QQmlJS::Dom::RefCacheEntry::canonicalPaths, QQmlJS::Dom::Path::field(), QQmlJS::Dom::RefCacheEntry::First, QQmlJS::Dom::RefCacheEntry::forPath(), i, QString::insert(), QQmlJS::Dom::RefCacheEntry::None, QQmlJS::Dom::DomItem::path(), qWarning, and sources().

Referenced by autoExports(), and iterateDirectSubpaths().

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

◆ canonicalPath()

Path QQmlJS::Dom::ModuleIndex::canonicalPath ( const DomItem & ) const
inlineoverridevirtual

Implements QQmlJS::Dom::OwningItem.

Definition at line 80 of file qqmldommoduleindex_p.h.

Referenced by autoExports().

+ Here is the caller graph for this function:

◆ directoryPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::directoryPaths ( ) const
inline

Definition at line 121 of file qqmldommoduleindex_p.h.

References mutex.

◆ doCopy()

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

Implements QQmlJS::Dom::OwningItem.

Definition at line 77 of file qqmldommoduleindex.cpp.

◆ ensureMinorVersion()

ModuleScope * QQmlJS::Dom::ModuleIndex::ensureMinorVersion ( int minorVersion)

Definition at line 294 of file qqmldommoduleindex.cpp.

References it, QQmlJS::Dom::Version::Latest, majorVersion(), QQmlJS::Dom::ModuleScope, QQmlJS::Dom::OwningItem::mutex(), qScopeGuard(), and QQmlJS::Dom::Version.

Referenced by ModuleIndex(), iterateDirectSubpaths(), and mergeWith().

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

◆ exportNames()

QSet< QString > QQmlJS::Dom::ModuleIndex::exportNames ( const DomItem & self) const

Definition at line 154 of file qqmldommoduleindex.cpp.

References i, and sources().

+ Here is the call graph for this function:

◆ exportsWithNameAndMinorVersion()

QList< DomItem > QQmlJS::Dom::ModuleIndex::exportsWithNameAndMinorVersion ( const DomItem & self,
const QString & name,
int minorVersion ) const

◆ iterateDirectSubpaths()

bool QQmlJS::Dom::ModuleIndex::iterateDirectSubpaths ( const DomItem & self,
DirectVisitor visitor ) const
overridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 117 of file qqmldommoduleindex.cpp.

References autoExports(), Qt::CaseInsensitive, el, ensureMinorVersion(), QQmlJS::Dom::DomBase::field(), QMap< Key, T >::insert(), QList< T >::isEmpty(), QQmlJS::Dom::Version::Latest, majorVersion(), map, QQmlJS::Dom::Map, minorVersions(), QString::number(), ok, QQmlJS::Dom::OwningItem::pathFromOwner(), sources(), and uri().

+ Here is the call graph for this function:

◆ kind()

DomType QQmlJS::Dom::ModuleIndex::kind ( ) const
inlineoverridevirtual

Implements QQmlJS::Dom::DomBase.

Definition at line 62 of file qqmldommoduleindex_p.h.

◆ majorVersion()

int QQmlJS::Dom::ModuleIndex::majorVersion ( ) const
inline

Definition at line 93 of file qqmldommoduleindex_p.h.

Referenced by ensureMinorVersion(), exportsWithNameAndMinorVersion(), iterateDirectSubpaths(), and qmldirsToLoad().

+ Here is the caller graph for this function:

◆ makeCopy()

std::shared_ptr< ModuleIndex > QQmlJS::Dom::ModuleIndex::makeCopy ( const DomItem & self) const
inline

Definition at line 75 of file qqmldommoduleindex_p.h.

◆ mergeWith()

void QQmlJS::Dom::ModuleIndex::mergeWith ( const std::shared_ptr< ModuleIndex > & o)

Definition at line 321 of file qqmldommoduleindex.cpp.

References QSet< T >::begin(), ensureMinorVersion(), it, QQmlJS::Dom::OwningItem::mutex(), and o.

+ Here is the call graph for this function:

◆ minorVersions()

QList< int > QQmlJS::Dom::ModuleIndex::minorVersions ( ) const
inline

Definition at line 96 of file qqmldommoduleindex_p.h.

References mutex.

Referenced by iterateDirectSubpaths().

+ Here is the caller graph for this function:

◆ qmldirPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::qmldirPaths ( ) const
inline

Definition at line 116 of file qqmldommoduleindex_p.h.

References mutex.

Referenced by qmldirsToLoad().

+ Here is the caller graph for this function:

◆ qmldirsToLoad()

QList< Path > QQmlJS::Dom::ModuleIndex::qmldirsToLoad ( const DomItem & self)

Definition at line 347 of file qqmldommoduleindex.cpp.

References QQmlJS::Dom::OwningItem::addErrorLocal(), arg, dir, QString::isEmpty(), majorVersion(), QQmlJS::Dom::OwningItem::mutex(), QQmlJS::Dom::myExportErrors(), QString::number(), QQmlJS::Dom::DomItem::ownerAs(), qCDebug, QQmlJS::Dom::Paths::qmldirFilePath(), qmldirPaths(), QString::split(), subPath(), tr, uri(), and warning().

+ Here is the call graph for this function:

◆ qmltypesFilesPaths()

QList< Path > QQmlJS::Dom::ModuleIndex::qmltypesFilesPaths ( ) const
inline

Definition at line 111 of file qqmldommoduleindex_p.h.

References mutex.

◆ sources()

QList< Path > QQmlJS::Dom::ModuleIndex::sources ( ) const

Definition at line 282 of file qqmldommoduleindex.cpp.

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

Referenced by autoExports(), exportNames(), exportsWithNameAndMinorVersion(), and iterateDirectSubpaths().

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

◆ uri()

QString QQmlJS::Dom::ModuleIndex::uri ( ) const
inline

Definition at line 92 of file qqmldommoduleindex_p.h.

Referenced by exportsWithNameAndMinorVersion(), iterateDirectSubpaths(), and qmldirsToLoad().

+ Here is the caller graph for this function:

Member Data Documentation

◆ kindValue

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

Definition at line 61 of file qqmldommoduleindex_p.h.


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