![]() |
Qt 6.x
The Qt SDK
|
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 |
The QQmlImportDatabase class manages the QML imports for a QQmlEngine.
Definition at line 265 of file qqmlimport_p.h.
| Enumerator | |
|---|---|
| QmldirFound | |
| QmldirNotFound | |
| QmldirInterceptedToRemote | |
| QmldirRejected | |
Definition at line 276 of file qqmlimport_p.h.
| Enumerator | |
|---|---|
| QmldirFileAndCache | |
| QmldirCacheOnly | |
Definition at line 271 of file qqmlimport_p.h.
| Enumerator | |
|---|---|
| Local | |
| Remote | |
| LocalOrRemote | |
Definition at line 269 of file qqmlimport_p.h.
| QQmlImportDatabase::QQmlImportDatabase | ( | QQmlEngine * | e | ) |
Definition at line 1549 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:
|
inline |
Definition at line 284 of file qqmlimport_p.h.
Definition at line 1647 of file qqmlimport.cpp.
References Backslash, dir, QFile::exists(), QString::isEmpty(), QUrl::isRelative(), lcQmlImport(), qCDebug, QString::replace(), 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:Definition at line 1625 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:| QStringList QQmlImportDatabase::dynamicPlugins | ( | ) | const |
Definition at line 1744 of file qqmlimport.cpp.
References QQmlPluginImporter::plugins().
Here is the call graph for this function:| QStringList QQmlImportDatabase::importPathList | ( | PathType | type = LocalOrRemote | ) | const |
Definition at line 1684 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:| QQmlImportDatabase::LocalQmldirResult QQmlImportDatabase::locateLocalQmldir | ( | const QString & | uri, |
| QTypeRevision | version, | ||
| QQmlImportDatabase::LocalQmldirSearchLocation | location, | ||
| const Callback & | callback | ||
| ) |
Definition at line 333 of file qqmlimport_p.h.
References absolutePath(), QString::at(), cache, QQmlImports::completeQmldirPaths(), QUrl::fromLocalFile(), importPathList(), QStringHash< T >::insert(), QQmlEngine::interceptUrl(), QString::isEmpty(), QList< T >::isEmpty(), QQmlFile::isLocalFile(), QString::lastIndexOf(), lcQmlImport(), QString::left(), Local, LocalOrRemote, qCDebug, QmldirCacheOnly, QQmlAbstractUrlInterceptor::QmldirFile, QmldirFound, QmldirInterceptedToRemote, QmldirNotFound, QmldirRejected, qPrintable, QStringLiteral, QUrl::RemoveScheme, QString::startsWith(), QUrl::toString(), url, QQmlImports::urlFromLocalFileOrQrcOrUrl(), QQmlEngine::urlInterceptors(), QQmlFile::urlToLocalFileOrQrc(), and QStringHash< T >::value().
Here is the call graph for this function:
|
static |
Definition at line 1717 of file qqmlimport.cpp.
References QTypeRevision::hasMajorVersion(), QString::isEmpty(), QTypeRevision::isValid(), QQmlMetaType::latestModuleVersion(), QList< T >::prepend(), 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:
|
inline |
Definition at line 293 of file qqmlimport_p.h.
| bool QQmlImportDatabase::removeDynamicPlugin | ( | const QString & | pluginId | ) |
Definition at line 1739 of file qqmlimport.cpp.
References QQmlPluginImporter::removePlugin().
Here is the call graph for this function:| void QQmlImportDatabase::setImportPathList | ( | const QStringList & | paths | ) |
Definition at line 1702 of file qqmlimport.cpp.
References addImportPath(), it, lcQmlImport(), and qCDebug.
Here is the call graph for this function:| void QQmlImportDatabase::setPluginPathList | ( | const QStringList & | paths | ) |
Definition at line 1616 of file qqmlimport.cpp.
References lcQmlImport(), and qCDebug.
Here is the call graph for this function:
|
friend |
Definition at line 307 of file qqmlimport_p.h.
|
friend |
Definition at line 308 of file qqmlimport_p.h.