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
QQmlImportDatabase Class Reference

The QQmlImportDatabase class manages the QML imports for a QQmlEngine. More...

#include <qqmlimport_p.h>

+ Collaboration diagram for QQmlImportDatabase:

Public Types

enum  PathType { Local , Remote , LocalOrRemote }
 
enum  LocalQmldirSearchLocation { QmldirFileAndCache , QmldirCacheOnly }
 
enum  LocalQmldirResult { QmldirFound , QmldirNotFound , QmldirInterceptedToRemote , QmldirRejected }
 

Public Member Functions

 QQmlImportDatabase (QQmlEngine *)
 
 ~QQmlImportDatabase ()
 
bool removeDynamicPlugin (const QString &pluginId)
 
QStringList dynamicPlugins () const
 
QStringList importPathList (PathType type=LocalOrRemote) const
 
void setImportPathList (const QStringList &paths)
 
void addImportPath (const QString &dir)
 
QStringList pluginPathList () const
 
void setPluginPathList (const QStringList &paths)
 
void addPluginPath (const QString &path)
 
template<typename Callback >
LocalQmldirResult locateLocalQmldir (const QString &uri, QTypeRevision version, LocalQmldirSearchLocation location, const Callback &callback)
 

Static Public Member Functions

static QTypeRevision lockModule (const QString &uri, const QString &typeNamespace, QTypeRevision version, QList< QQmlError > *errors)
 

Friends

class QQmlImports
 
class QQmlPluginImporter
 

Detailed Description

The QQmlImportDatabase class manages the QML imports for a QQmlEngine.

Definition at line 261 of file qqmlimport_p.h.

Member Enumeration Documentation

◆ LocalQmldirResult

Enumerator
QmldirFound 
QmldirNotFound 
QmldirInterceptedToRemote 
QmldirRejected 

Definition at line 272 of file qqmlimport_p.h.

◆ LocalQmldirSearchLocation

Enumerator
QmldirFileAndCache 
QmldirCacheOnly 

Definition at line 267 of file qqmlimport_p.h.

◆ PathType

Enumerator
Local 
Remote 
LocalOrRemote 

Definition at line 265 of file qqmlimport_p.h.

Constructor & Destructor Documentation

◆ QQmlImportDatabase()

QQmlImportDatabase::QQmlImportDatabase ( QQmlEngine * e)

Definition at line 1506 of file qqmlimport.cpp.

References addImportPath(), addPluginPath(), QCoreApplication::applicationDirPath(), canonicalPath(), QFile::exists(), parseEnvPath(), QLibraryInfo::path(), Q_UNLIKELY, qEnvironmentVariable(), qEnvironmentVariableIsEmpty(), QLibraryInfo::QmlImportsPath, QStringLiteral, and var.

+ Here is the call graph for this function:

◆ ~QQmlImportDatabase()

QQmlImportDatabase::~QQmlImportDatabase ( )
inline

Definition at line 280 of file qqmlimport_p.h.

Member Function Documentation

◆ addImportPath()

void QQmlImportDatabase::addImportPath ( const QString & path)

Definition at line 1604 of file qqmlimport.cpp.

References Backslash, dir, QFile::exists(), QUrl::isRelative(), lcQmlImport(), qCDebug, QUrl::scheme(), QString::size(), Slash, url, and QQmlFile::urlToLocalFileOrQrc().

Referenced by QQmlImportDatabase(), and setImportPathList().

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

◆ addPluginPath()

void QQmlImportDatabase::addPluginPath ( const QString & path)

Definition at line 1582 of file qqmlimport.cpp.

References dir, QFile::exists(), QUrl::isRelative(), lcQmlImport(), qCDebug, QUrl::scheme(), QString::size(), and url.

Referenced by QQmlImportDatabase().

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

◆ dynamicPlugins()

QStringList QQmlImportDatabase::dynamicPlugins ( ) const

Definition at line 1701 of file qqmlimport.cpp.

References QQmlPluginImporter::plugins().

+ Here is the call graph for this function:

◆ importPathList()

QStringList QQmlImportDatabase::importPathList ( PathType type = LocalOrRemote) const

Definition at line 1641 of file qqmlimport.cpp.

References QList< T >::append(), QQmlFile::isLocalFile(), list, Local, and LocalOrRemote.

Referenced by locateLocalQmldir().

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

◆ locateLocalQmldir()

◆ lockModule()

QTypeRevision QQmlImportDatabase::lockModule ( const QString & uri,
const QString & typeNamespace,
QTypeRevision version,
QList< QQmlError > * errors )
static

Definition at line 1674 of file qqmlimport.cpp.

References QTypeRevision::hasMajorVersion(), QString::isEmpty(), QTypeRevision::isValid(), QQmlMetaType::latestModuleVersion(), and QQmlMetaType::protectModule().

Referenced by QQmlPluginImporter::importDynamicPlugin(), and QQmlPluginImporter::importStaticPlugin().

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

◆ pluginPathList()

QStringList QQmlImportDatabase::pluginPathList ( ) const
inline

Definition at line 289 of file qqmlimport_p.h.

◆ removeDynamicPlugin()

bool QQmlImportDatabase::removeDynamicPlugin ( const QString & pluginId)

Definition at line 1696 of file qqmlimport.cpp.

References QQmlPluginImporter::removePlugin().

+ Here is the call graph for this function:

◆ setImportPathList()

void QQmlImportDatabase::setImportPathList ( const QStringList & paths)

Definition at line 1659 of file qqmlimport.cpp.

References addImportPath(), it, lcQmlImport(), and qCDebug.

+ Here is the call graph for this function:

◆ setPluginPathList()

void QQmlImportDatabase::setPluginPathList ( const QStringList & paths)

Definition at line 1573 of file qqmlimport.cpp.

References lcQmlImport(), and qCDebug.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQmlImports

friend class QQmlImports
friend

Definition at line 303 of file qqmlimport_p.h.

◆ QQmlPluginImporter

friend class QQmlPluginImporter
friend

Definition at line 304 of file qqmlimport_p.h.


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