4#ifndef QQMLDOMMODULEINDEX_P_H
5#define QQMLDOMMODULEINDEX_P_H
28 constexpr static DomType kindValue = DomType::ModuleScope;
32 : uri(uri), version(version)
38 return Path::Field(Fields::moduleScope)
44 return self.owner().canonicalPath().path(pathFromOwner());
57 std::shared_ptr<OwningItem> doCopy(
const DomItem &self)
const override;
60 enum class Status { NotLoaded, Loading, Loaded };
61 constexpr static DomType kindValue = DomType::ModuleIndex;
65 const QString &uri,
int majorVersion,
int derivedFrom = 0,
67 :
OwningItem(derivedFrom, lastDataUpdateAt), m_uri(uri), m_majorVersion(majorVersion)
77 return std::static_pointer_cast<ModuleIndex>(doCopy(self));
82 return Paths::moduleIndexPath(uri(), majorVersion());
87 QSet<QString> exportNames(
const DomItem &self)
const;
89 QList<DomItem> exportsWithNameAndMinorVersion(
const DomItem &self,
const QString &
name,
90 int minorVersion)
const;
99 return m_moduleScope.keys();
102 void mergeWith(
const std::shared_ptr<ModuleIndex> &
o);
106 if (!m_qmltypesFilesPaths.contains(
p))
107 m_qmltypesFilesPaths.append(
p);
110 QList<Path> qmldirsToLoad(
const DomItem &self);
114 return m_qmltypesFilesPaths;
119 return m_qmldirPaths;
124 return m_directoryPaths;
126 QList<DomItem> autoExports(
const DomItem &self)
const;
132 QList<Path> m_qmltypesFilesPaths;
133 QList<Path> m_qmldirPaths;
134 QList<Path> m_directoryPaths;
135 QMap<int, ModuleScope *> m_moduleScope;
\inmodule QtCore\reentrant
static QDateTime fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone)
DomType kind() const override
QList< Path > qmldirPaths() const
Path canonicalPath(const DomItem &) const override
QList< int > minorVersions() const
std::shared_ptr< ModuleIndex > makeCopy(const DomItem &self) const
void addQmltypeFilePath(const Path &p)
QList< Path > directoryPaths() const
ModuleIndex(const QString &uri, int majorVersion, int derivedFrom=0, const QDateTime &lastDataUpdateAt=QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC))
QList< Path > qmltypesFilesPaths() const
ModuleScope(const QString &uri=QString(), const Version &version=Version())
Path pathFromOwner(const DomItem &) const override
Path canonicalPath(const DomItem &self) const override
DomType kind() const override
Path pathFromOwner() const
Path key(const QString &name) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
#define Q_DECLARE_TR_FUNCTIONS(context)