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>.
|
#include <qqmlimport_p.h>
Public Member Functions | |
QQmlImportNamespace () | |
~QQmlImportNamespace () | |
QQmlImportInstance * | findImport (const QString &uri) const |
bool | resolveType (QQmlTypeLoader *typeLoader, const QHashedStringRef &type, QTypeRevision *version_return, QQmlType *type_return, const QString *base=nullptr, QList< QQmlError > *errors=nullptr, QQmlType::RegistrationType registrationType=QQmlType::AnyRegistrationType, bool *typeRecursionDeteced=nullptr) |
bool | needsSorting () const |
void | setNeedsSorting (bool needsSorting) |
Public Attributes | |
QList< QQmlImportInstance * > | imports |
QHashedString | prefix |
QQmlImportNamespace * | nextNamespace = nullptr |
A QQmlImportNamespace is a way of seperating imports into a local namespace.
Within a QML document, there is at least one namespace (the "unqualified set") where imports without a qualifier are placed, i.e:
import QtQuick 2.6
will have a single namespace (the unqualified set) containing a single import for QtQuick 2.6. However, there may be others if an import statement gives a qualifier, i.e the following will result in an additional new QQmlImportNamespace in the qualified set:
import MyFoo 1.0 as Foo
Definition at line 85 of file qqmlimport_p.h.
|
inline |
Definition at line 88 of file qqmlimport_p.h.
|
inline |
Definition at line 89 of file qqmlimport_p.h.
References imports, and qDeleteAll().
QQmlImportInstance * QQmlImportNamespace::findImport | ( | const QString & | uri | ) | const |
Definition at line 785 of file qqmlimport.cpp.
References imports.
Referenced by QQmlImports::updateQmldirContent().
|
inline |
Definition at line 109 of file qqmlimport_p.h.
References nextNamespace.
Referenced by resolveType(), and setNeedsSorting().
bool QQmlImportNamespace::resolveType | ( | QQmlTypeLoader * | typeLoader, |
const QHashedStringRef & | type, | ||
QTypeRevision * | version_return, | ||
QQmlType * | type_return, | ||
const QString * | base = nullptr, | ||
QList< QQmlError > * | errors = nullptr, | ||
QQmlType::RegistrationType | registrationType = QQmlType::AnyRegistrationType, | ||
bool * | typeRecursionDeteced = nullptr ) |
Definition at line 794 of file qqmlimport.cpp.
References QQmlImport::AllowRecursion, arg, QList< T >::at(), base, QList< T >::begin(), Dot, dot(), QList< T >::end(), error, i, imports, j, QStringView::left(), needsSorting(), QQmlImport::PreventRecursion, setNeedsSorting(), and QList< T >::size().
|
inline |
Definition at line 110 of file qqmlimport_p.h.
References needsSorting(), nextNamespace, Q_ASSERT, and this.
Referenced by QQmlImports::addInlineComponentImport(), and resolveType().
QList<QQmlImportInstance *> QQmlImportNamespace::imports |
Definition at line 91 of file qqmlimport_p.h.
Referenced by ~QQmlImportNamespace(), QQmlImports::addFileImport(), addImportToNamespace(), QQmlImports::addInlineComponentImport(), findImport(), resolveType(), and QQmlImportInstance::setQmldirContent().
QQmlImportNamespace* QQmlImportNamespace::nextNamespace = nullptr |
Definition at line 108 of file qqmlimport_p.h.
Referenced by needsSorting(), and setNeedsSorting().
QHashedString QQmlImportNamespace::prefix |
Definition at line 102 of file qqmlimport_p.h.
Referenced by QQmlImports::addFileImport().