Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlImportNamespace Class Reference

#include <qqmlimport_p.h>

Collaboration diagram for QQmlImportNamespace:

Public Member Functions

 QQmlImportNamespace ()
 ~QQmlImportNamespace ()
QQmlImportInstancefindImportByModuleUri (const QString &moduleUri, QTypeRevision version) const
QQmlImportInstancefindImportByLocation (const QString &location, QTypeRevision version) 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
QQmlImportNamespacenextNamespace = nullptr

Detailed Description

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.

Constructor & Destructor Documentation

◆ QQmlImportNamespace()

QQmlImportNamespace::QQmlImportNamespace ( )
inline

Definition at line 89 of file qqmlimport_p.h.

References nextNamespace.

◆ ~QQmlImportNamespace()

QQmlImportNamespace::~QQmlImportNamespace ( )
inline

Definition at line 90 of file qqmlimport_p.h.

Member Function Documentation

◆ findImportByLocation()

QQmlImportInstance * QQmlImportNamespace::findImportByLocation ( const QString & location,
QTypeRevision version ) const

Definition at line 769 of file qqmlimport.cpp.

◆ findImportByModuleUri()

QQmlImportInstance * QQmlImportNamespace::findImportByModuleUri ( const QString & moduleUri,
QTypeRevision version ) const

Definition at line 759 of file qqmlimport.cpp.

◆ needsSorting()

bool QQmlImportNamespace::needsSorting ( ) const
inline

Definition at line 113 of file qqmlimport_p.h.

References nextNamespace.

Referenced by resolveType().

Here is the caller graph for this function:

◆ resolveType()

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 779 of file qqmlimport.cpp.

References QQmlImport::AllowRecursion, needsSorting(), QQmlImport::PreventRecursion, and setNeedsSorting().

Here is the call graph for this function:

◆ setNeedsSorting()

void QQmlImportNamespace::setNeedsSorting ( bool needsSorting)
inline

Definition at line 114 of file qqmlimport_p.h.

References nextNamespace.

Referenced by resolveType().

Here is the caller graph for this function:

Member Data Documentation

◆ imports

QList<QQmlImportInstance *> QQmlImportNamespace::imports

Definition at line 92 of file qqmlimport_p.h.

◆ nextNamespace

QQmlImportNamespace* QQmlImportNamespace::nextNamespace = nullptr

Definition at line 112 of file qqmlimport_p.h.

Referenced by QQmlImportNamespace(), needsSorting(), and setNeedsSorting().

◆ prefix

QHashedString QQmlImportNamespace::prefix

Definition at line 106 of file qqmlimport_p.h.


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