![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlengine_p.h>
Classes | |
struct | ResolveTypeResult |
Public Member Functions | |
LoadHelper (QQmlTypeLoader *loader, QAnyStringView uri) | |
ResolveTypeResult | resolveType (QAnyStringView typeName) |
![]() | |
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) |
![]() | |
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 |
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. | |
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. | |
![]() | |
void | release () const |
![]() | |
QQmlRefCount () | |
void | addref () const |
int | count () const |
Protected Member Functions | |
void | dataReceived (const SourceCodeData &) final |
Invoked when data for the blob is received. | |
void | initializeFromCachedUnit (const QQmlPrivate::CachedQmlUnit *) final |
![]() | |
bool | addImport (const QV4::CompiledData::Import *import, QQmlImports::ImportFlags, QList< QQmlError > *errors) |
bool | addImport (PendingImportPtr import, QList< QQmlError > *errors) |
bool | fetchQmldir (const QUrl &url, PendingImportPtr import, int priority, QList< QQmlError > *errors) |
bool | updateQmldir (const QQmlRefPointer< QQmlQmldirData > &data, const PendingImportPtr &import, QList< QQmlError > *errors) |
bool | loadDependentImports (const QList< QQmlDirParser::Import > &imports, const QString &qualifier, QTypeRevision version, quint16 precedence, QQmlImports::ImportFlags flags, QList< QQmlError > *errors) |
virtual QString | stringAt (int) const |
bool | isDebugging () const |
bool | readCacheFile () const |
bool | writeCacheFile () const |
QQmlMetaType::CacheMode | aotCacheMode () const |
![]() | |
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 (QQmlDataBlob *) |
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 (QQmlDataBlob *) |
Called if blob, which was previously waited for, has an error. | |
virtual void | dependencyComplete (QQmlDataBlob *) |
Called if blob, which was previously waited for, has completed. | |
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. | |
![]() | |
~QQmlRefCounted () | |
Definition at line 399 of file qqmlengine_p.h.
LoadHelper::LoadHelper | ( | QQmlTypeLoader * | loader, |
QAnyStringView | uri | ||
) |
Definition at line 2163 of file qqmlengine.cpp.
|
inlinefinalprotectedvirtual |
Invoked when data for the blob is received.
Implementors should use this callback to determine a blob's dependencies. Within this callback you may call setError() or addDependency().
Implements QQmlDataBlob.
Definition at line 412 of file qqmlengine_p.h.
|
inlinefinalprotectedvirtual |
Implements QQmlDataBlob.
Definition at line 413 of file qqmlengine_p.h.
LoadHelper::ResolveTypeResult LoadHelper::resolveType | ( | QAnyStringView | typeName | ) |
Definition at line 2177 of file qqmlengine.cpp.
References QQmlDataBlob::errors(), QQmlTypeLoader::Blob::m_importCache, LoadHelper::ResolveTypeResult::ModuleFound, LoadHelper::ResolveTypeResult::NoSuchModule, QQmlImports::resolveType(), QQmlDataBlob::type(), QQmlTypeModule::type(), QQmlMetaType::typeModule(), and typeName.