![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlimport_p.h>
Collaboration diagram for QQmlImportNamespace: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 86 of file qqmlimport_p.h.
|
inline |
Definition at line 89 of file qqmlimport_p.h.
|
inline |
Definition at line 90 of file qqmlimport_p.h.
References imports, and qDeleteAll().
Here is the call graph for this function:| QQmlImportInstance * QQmlImportNamespace::findImport | ( | const QString & | uri | ) | const |
Definition at line 795 of file qqmlimport.cpp.
References imports.
Referenced by QQmlImports::updateQmldirContent().
Here is the caller graph for this function:
|
inline |
Definition at line 110 of file qqmlimport_p.h.
References nextNamespace.
Referenced by resolveType(), and setNeedsSorting().
Here is the caller graph for this function:| 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 804 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(), QTypeRevision::majorVersion(), QStringView::mid(), QTypeRevision::minorVersion(), needsSorting(), QList< T >::prepend(), QQmlImport::PreventRecursion, QQmlImportInstance::resolveType(), setNeedsSorting(), QList< T >::size(), QQmlImportInstance::url, and QQmlImportInstance::version.
Here is the call graph for this function:
|
inline |
Definition at line 111 of file qqmlimport_p.h.
References needsSorting(), nextNamespace, Q_ASSERT, and this.
Referenced by QQmlImports::addInlineComponentImport(), and resolveType().
Here is the call graph for this function:
Here is the caller graph for this function:| QList<QQmlImportInstance *> QQmlImportNamespace::imports |
Definition at line 92 of file qqmlimport_p.h.
Referenced by ~QQmlImportNamespace(), QQmlImports::addFileImport(), QQmlImports::addInlineComponentImport(), findImport(), resolveType(), and QQmlImportInstance::setQmldirContent().
| QQmlImportNamespace* QQmlImportNamespace::nextNamespace = nullptr |
Definition at line 109 of file qqmlimport_p.h.
Referenced by needsSorting(), and setNeedsSorting().
| QHashedString QQmlImportNamespace::prefix |
Definition at line 103 of file qqmlimport_p.h.
Referenced by QQmlImports::addFileImport().