![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qqmltypeloader_p.h>
Classes | |
| struct | PendingImport |
Public Types | |
| using | PendingImportPtr = std::shared_ptr<PendingImport> |
| Public Types inherited from QQmlDataBlob | |
| enum | Status { Null , Loading , WaitingForDependencies , ResolvingDependencies , Complete , Error } |
| This enum describes the status of the data blob. More... | |
| enum | Type { QmlFile = QQmlAbstractUrlInterceptor::QmlFile , JavaScriptFile = QQmlAbstractUrlInterceptor::JavaScriptFile , QmldirFile = QQmlAbstractUrlInterceptor::QmldirFile } |
| This enum describes the type of the data blob. More... | |
| using | Ptr = QQmlRefPointer<QQmlDataBlob> |
Public Member Functions | |
| Blob (const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader) | |
| ~Blob () override | |
| const QQmlImports * | imports () const |
| void | setCachedUnitStatus (QQmlMetaType::CachedUnitLookupError status) |
| void | importQmldirScripts (const PendingImportPtr &import, const QQmlTypeLoaderQmldirContent &qmldir, const QUrl &qmldirUrl) |
| bool | handleLocalQmldirForImport (const PendingImportPtr &import, const QString &qmldirFilePath, const QString &qmldirUrl, QList< QQmlError > *errors) |
| Public Member Functions inherited from QQmlDataBlob | |
| QQmlDataBlob (const QUrl &, Type, QQmlTypeLoader *manager) | |
| Create a new QQmlDataBlob for url and of the provided type. | |
| virtual | ~QQmlDataBlob () |
| void | startLoading () |
| Must be called before loading can occur. | |
| QQmlTypeLoader * | typeLoader () const |
| void | resetTypeLoader () |
| Type | type () const |
| Returns the type provided to the constructor. | |
| Status | status () const |
| Returns the blob's status. | |
| bool | isNull () const |
| Returns true if the status is Null. | |
| bool | isLoading () const |
| Returns true if the status is Loading. | |
| bool | isWaiting () const |
| Returns true if the status is WaitingForDependencies. | |
| bool | isComplete () const |
| Returns true if the status is Complete. | |
| bool | isError () const |
| Returns true if the status is Error. | |
| bool | isCompleteOrError () const |
| Returns true if the status is Complete or Error. | |
| bool | isAsync () const |
| qreal | progress () const |
| Returns the data download progress from 0 to 1. | |
| QUrl | url () const |
| Returns the physical url of the data. | |
| QString | urlString () const |
| QUrl | finalUrl () const |
| Returns the logical URL to be used for resolving further URLs referred to in the code. | |
| QString | finalUrlString () const |
| Returns the finalUrl() as a string. | |
| QList< QQmlError > | errors () const |
| Return the errors on this blob. | |
| template<typename Loader = QQmlTypeLoader> | |
| void | assertTypeLoaderThreadIfRunning () const |
| template<typename Loader = QQmlTypeLoader> | |
| void | assertTypeLoaderThread () const |
| template<typename Loader = QQmlTypeLoader> | |
| void | assertEngineThreadIfRunning () const |
| template<typename Loader = QQmlTypeLoader> | |
| void | assertEngineThread () const |
| Public Member Functions inherited from QQmlRefCounted< QQmlDataBlob > | |
| void | release () const |
| Public Member Functions inherited from QQmlRefCount | |
| QQmlRefCount () | |
| void | addref () const |
| int | count () const |
Protected Member Functions | |
| bool | addImport (const QV4::CompiledData::Import *import, QQmlImports::ImportFlags, QList< QQmlError > *errors) |
| bool | addImport (const PendingImportPtr &import, QList< QQmlError > *errors) |
| bool | fetchQmldir (const QUrl &url, const PendingImportPtr &import, int priority, QList< QQmlError > *errors) |
| bool | updateQmldir (const QQmlRefPointer< QQmlQmldirData > &data, const PendingImportPtr &import, QList< QQmlError > *errors) |
| bool | registerPendingTypes (const PendingImportPtr &import) |
| bool | loadDependentImports (const QList< QQmlDirParser::Import > &imports, const QString &qualifier, QTypeRevision version, quint8 precedence, QQmlImports::ImportFlags flags, QList< QQmlError > *errors) |
| virtual QString | stringAt (int) const |
| Protected Member Functions inherited from QQmlDataBlob | |
| void | setError (const QQmlError &) |
| Mark this blob as having errors. | |
| void | setError (const QList< QQmlError > &errors) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | setError (const QQmlJS::DiagnosticMessage &error) |
| void | setError (const QString &description) |
| void | addDependency (const QQmlDataBlob::Ptr &) |
| Wait for blob to become complete or to error. | |
| virtual void | dataReceived (const SourceCodeData &)=0 |
| Invoked when data for the blob is received. | |
| virtual void | initializeFromCachedUnit (const QQmlPrivate::CachedQmlUnit *)=0 |
| virtual void | done () |
| Invoked once data has either been received or a network error occurred, and all dependencies are complete. | |
| virtual void | dependencyError (const QQmlDataBlob::Ptr &) |
| Called if blob, which was previously waited for, has an error. | |
| virtual void | allDependenciesDone () |
| Called when all blobs waited for have completed. | |
| virtual void | downloadProgressChanged (qreal) |
| Called when the download progress of this blob changes. | |
| virtual void | completed () |
| Invoked on the main thread sometime after done() was called on the load thread. | |
| Protected Member Functions inherited from QQmlRefCounted< QQmlDataBlob > | |
| ~QQmlRefCounted () | |
Protected Attributes | |
| QQmlRefPointer< QQmlImports > | m_importCache |
| QVector< PendingImportPtr > | m_unresolvedImports |
| QVector< QQmlRefPointer< QQmlQmldirData > > | m_qmldirs |
| QQmlMetaType::CachedUnitLookupError | m_cachedUnitStatus = QQmlMetaType::CachedUnitLookupError::NoError |
| Protected Attributes inherited from QQmlDataBlob | |
| QQmlTypeLoader * | m_typeLoader |
| QList< QQmlDataBlob * > | m_waitingOnMe |
Private Member Functions | |
| virtual bool | qmldirDataAvailable (const QQmlRefPointer< QQmlQmldirData > &, QList< QQmlError > *) |
| virtual void | scriptImported (const QQmlRefPointer< QQmlScriptBlob > &, const QV4::CompiledData::Location &, const QString &, const QString &) |
| void | dependencyComplete (const QQmlDataBlob::Ptr &) override |
| Called if blob, which was previously waited for, has completed. | |
Definition at line 50 of file qqmltypeloader_p.h.
| using QQmlTypeLoader::Blob::PendingImportPtr = std::shared_ptr<PendingImport> |
Definition at line 79 of file qqmltypeloader_p.h.
| QQmlTypeLoader::Blob::Blob | ( | const QUrl & | url, |
| QQmlDataBlob::Type | type, | ||
| QQmlTypeLoader * | loader ) |
Definition at line 706 of file qqmltypeloader.cpp.
|
override |
Definition at line 712 of file qqmltypeloader.cpp.
|
protected |
Definition at line 1023 of file qqmltypeloader.cpp.
|
protected |
Definition at line 1016 of file qqmltypeloader.cpp.
|
overrideprivatevirtual |
Called if blob, which was previously waited for, has completed.
The default implementation does nothing.
Reimplemented from QQmlDataBlob.
Definition at line 1045 of file qqmltypeloader.cpp.
|
protected |
Definition at line 716 of file qqmltypeloader.cpp.
| bool QQmlTypeLoader::Blob::handleLocalQmldirForImport | ( | const PendingImportPtr & | import, |
| const QString & | qmldirFilePath, | ||
| const QString & | qmldirUrl, | ||
| QList< QQmlError > * | errors ) |
Definition at line 811 of file qqmltypeloader.cpp.
| void QQmlTypeLoader::Blob::importQmldirScripts | ( | const PendingImportPtr & | import, |
| const QQmlTypeLoaderQmldirContent & | qmldir, | ||
| const QUrl & | qmldirUrl ) |
Import any qualified scripts of for import as listed in qmldir. Precondition is that import is actually qualified.
Definition at line 744 of file qqmltypeloader.cpp.
|
inline |
Definition at line 56 of file qqmltypeloader_p.h.
|
protected |
Definition at line 1065 of file qqmltypeloader.cpp.
|
privatevirtual |
Definition at line 1182 of file qqmltypeloader.cpp.
|
protected |
Definition at line 999 of file qqmltypeloader.cpp.
|
inlineprivatevirtual |
Reimplemented in QQmlScriptBlob, and QQmlTypeData.
Definition at line 103 of file qqmltypeloader_p.h.
|
inline |
Definition at line 58 of file qqmltypeloader_p.h.
|
inlineprotectedvirtual |
Reimplemented in QQmlScriptBlob, and QQmlTypeData.
Definition at line 124 of file qqmltypeloader_p.h.
|
protected |
Definition at line 835 of file qqmltypeloader.cpp.
|
protected |
Definition at line 129 of file qqmltypeloader_p.h.
|
protected |
Definition at line 126 of file qqmltypeloader_p.h.
|
protected |
Definition at line 128 of file qqmltypeloader_p.h.
|
protected |
Definition at line 127 of file qqmltypeloader_p.h.