4#include <private/qqmltypeloader_p.h>
6#include <private/qqmldirdata_p.h>
7#include <private/qqmlprofiler_p.h>
8#include <private/qqmlscriptblob_p.h>
9#include <private/qqmltypedata_p.h>
10#include <private/qqmltypeloaderqmldircontent_p.h>
11#include <private/qqmltypeloaderthread_p.h>
12#include <private/qqmlsourcecoordinate_p.h>
14#include <QtQml/qqmlabstracturlinterceptor.h>
15#include <QtQml/qqmlengine.h>
16#include <QtQml/qqmlextensioninterface.h>
17#include <QtQml/qqmlfile.h>
19#include <qtqml_tracepoints_p.h>
21#include <QtCore/qdir.h>
22#include <QtCore/qdiriterator.h>
23#include <QtCore/qfile.h>
24#include <QtCore/qthread.h>
30#define ASSERT_LOADTHREAD() do { if (!m_thread->isThisThread()) qFatal("QQmlTypeLoader: Caller not in load thread"); } while (false)
32#define ASSERT_LOADTHREAD()
40 template<
typename LockType>
90#if QT_CONFIG(qml_network)
94 m_networkReplies.clear();
98#if QT_CONFIG(qml_debug)
109 loader->loadThread(blob);
113 loader->m_thread->
load(blob);
127 loader->loadWithStaticDataThread(blob,
data);
145 loader->loadWithCachedUnitThread(blob,
unit);
157template<
typename Loader>
168 loader.loadThread(
this, blob);
171 blob->m_data.setIsAsync(
true);
173 loader.loadAsync(
this, blob);
177 loader.load(
this, blob);
181 blob->m_data.setIsAsync(
true);
227 setCachedUnit(blob, unit);
256 blob->m_data.setProgress(1.f);
257 if (blob->m_data.isAsync())
263#if QT_CONFIG(qml_network)
266 m_networkReplies.insert(
reply, blob);
269 nrp->manualFinished(
reply);
274 nrp,
SLOT(finished()));
284#define DATALOADER_MAXIMUM_REDIRECT_RECURSION 16
286#ifndef TYPELOADER_MINIMUM_TRIM_THRESHOLD
287#define TYPELOADER_MINIMUM_TRIM_THRESHOLD 64
290#if QT_CONFIG(qml_network)
297 QQmlRefPointer<QQmlDataBlob> blob = m_networkReplies.
take(
reply);
301 blob->m_redirectCount++;
307 blob->m_finalUrl =
url;
308 blob->m_finalUrlString.clear();
311 QObject *nrp = m_thread->networkReplyProxy();
313 m_networkReplies.insert(
reply, std::move(blob));
334 const QQmlRefPointer<QQmlDataBlob> blob = m_networkReplies.value(
reply);
338 if (bytesTotal != 0) {
340 blob->m_data.setProgress(progress);
341 if (blob->m_data.isAsync())
359template<
class Interface>
369 iface->initializeEngine(
engine, uri);
387 d.hasInlineSourceCode =
true;
403 blob->m_inCallback =
true;
413 blob->m_inCallback =
false;
423 blob->m_inCallback =
true;
433 blob->m_inCallback =
false;
438void QQmlTypeLoader::shutdownThread()
446 QQmlImports::ImportFlags
flags)
447 : uri(blob->stringAt(import->uriIndex))
448 , qualifier(blob->stringAt(import->qualifierIndex))
452 , version(import->version)
468 QQmlRefPointer<QQmlQmldirData>
data = typeLoader()->getQmldir(
url);
470 data->setPriority(
this, std::move(
import), priority);
477 return qmldirDataAvailable(
data, errors);
481 addDependency(
data.data());
494 const auto qmldirScripts = qmldir.
scripts();
497 QQmlRefPointer<QQmlScriptBlob> blob = typeLoader()->getScript(scriptUrl);
498 addDependency(blob.data());
499 scriptImported(blob, import->location, script.nameSpace, import->qualifier);
503template<
typename URL>
507 const URL &qmldirUrl)
510 if (!import->qualifier.isEmpty())
511 self->importQmldirScripts(
import, qmldir,
QUrl(qmldirUrl));
518 auto module = QQmlMetaType::typeModule(qmldir.typeNamespace(), import->version);
530 typeLoader()->setQmldirContent(qmldirIdentifier,
data->content());
532 const QTypeRevision version = m_importCache->updateQmldirContent(
533 typeLoader(), import->uri, import->qualifier, qmldirIdentifier, qmldirUrl, errors);
539 import->version = version;
541 if (!loadImportDependencies(
import, qmldirIdentifier, import->flags, errors))
544 import->priority = 0;
562 addDependency(blob.data());
563 scriptImported(blob, import->location, import->qualifier,
QString());
569 QQmlImports::ImportFlags
flags;
571 QUrl importUrl(import->uri);
574 importUrl.setPath(
path);
582 typeLoader(), import->uri, import->qualifier, import->version,
flags,
583 import->precedence,
nullptr, errors);
589 import->version = version;
592 if (!fetchQmldir(qmldirUrl,
import, 1, errors))
596 if (!loadImportDependencies(
import, qmldirFilePath, import->flags, errors))
609 QString reason = errors->front().description();
610 if (reason.
size() > 512)
612 if (import->version.hasMajorVersion()) {
613 error.setDescription(QQmlImportDatabase::tr(
614 "module \"%1\" version %2.%3 cannot be imported because:\n%4")
615 .
arg(import->uri).arg(import->version.majorVersion())
616 .arg(import->version.hasMinorVersion()
621 error.setDescription(QQmlImportDatabase::tr(
"module \"%1\" cannot be imported because:\n%2")
622 .arg(import->uri, reason));
624 errors->prepend(
error);
638 import->uri, import->version, searchMode,
641 const QTypeRevision actualVersion = m_importCache->addLibraryImport(
642 typeLoader(), import->uri, import->qualifier, import->version, qmldirFilePath,
643 qmldirUrl, import->flags, import->precedence, errors);
644 if (!actualVersion.isValid())
648 if (actualVersion.hasMajorVersion())
649 import->version = actualVersion;
651 if (!loadImportDependencies(import, qmldirFilePath, import->flags, errors)) {
652 addDependencyImportError(import, errors);
660 switch (qmldirResult) {
664 if (!loadImportDependencies(
import,
QString(), import->flags, errors)) {
690 if (!m_importCache->addLibraryImport(
691 typeLoader(), import->uri, import->qualifier, import->version,
QString(),
692 QString(), import->flags, import->precedence, errors).isValid()) {
697 m_unresolvedImports <<
import;
700 const bool hasInterceptors
708 if (!remotePathList.isEmpty()) {
710 const QTypeRevision version = m_importCache->addLibraryImport(
711 typeLoader(), import->uri, import->qualifier, import->version,
QString(),
720 import->version = version;
725 import->uri, remotePathList, import->version);
726 for (
const QString &qmldirPath : qmlDirPaths) {
727 if (hasInterceptors) {
732 && !fetchQmldir(
url,
import, ++priority, errors)) {
735 }
else if (!fetchQmldir(
QUrl(qmldirPath),
import, ++priority, errors)) {
747 QQmlImports::ImportFlags
flags, QList<QQmlError> *errors)
749 return addImport(std::make_shared<PendingImport>(
this,
import,
flags), errors);
757 switch (import->type)
760 return addLibraryImport(
import, errors);
762 return addFileImport(
import ,errors);
764 return addScriptImport(
import);
766 Q_UNREACHABLE_RETURN(
false);
769 Q_UNREACHABLE_RETURN(
false);
776 QList<QQmlError> errors;
777 if (!qmldirDataAvailable(
data, &errors)) {
780 error.setUrl(m_importCache->baseUrl());
782 error.setLine(qmlConvertSourceCoordinate<quint32, int>(importLocation.
line()));
783 error.setColumn(qmlConvertSourceCoordinate<quint32, int>(importLocation.
column()));
784 errors.prepend(
error);
791 const QList<QQmlDirParser::Import> &imports,
const QString &qualifier,
793 QList<QQmlError> *errors)
795 for (
const auto &
import : imports) {
798 auto dependencyImport = std::make_shared<PendingImport>();
799 dependencyImport->uri =
import.module;
800 dependencyImport->qualifier = qualifier;
802 ? version :
import.version;
803 dependencyImport->flags =
flags;
804 dependencyImport->precedence = precedence;
807 <<
"loading dependent import" << dependencyImport->uri <<
"version"
808 << dependencyImport->version <<
"as" << dependencyImport->qualifier;
810 if (!addImport(dependencyImport, errors)) {
812 error.setDescription(
814 "Failed to load dependent import \"%1\" version %2.%3")
815 .
arg(dependencyImport->uri)
816 .arg(dependencyImport->version.majorVersion())
817 .arg(dependencyImport->version.minorVersion()));
818 errors->append(
error);
826bool QQmlTypeLoader::Blob::loadImportDependencies(
828 QQmlImports::ImportFlags
flags, QList<QQmlError> *errors)
830 QList<QQmlDirParser::Import> implicitImports
832 if (!qmldirUri.isEmpty())
833 implicitImports += typeLoader()->qmldirContent(qmldirUri).imports();
836 switch (currentImport->precedence) {
840 error.setDescription(
842 .
arg(currentImport->uri)
843 .arg(currentImport->version.majorVersion())
844 .arg(currentImport->version.minorVersion()));
845 errors->append(
error);
852 if (!loadDependentImports(
853 implicitImports, currentImport->qualifier, currentImport->version,
854 currentImport->precedence + 1,
flags, errors)) {
856 error.setDescription(
858 "Failed to load dependencies for module \"%1\" version %2.%3")
859 .
arg(currentImport->uri)
860 .arg(currentImport->version.majorVersion())
861 .arg(currentImport->version.minorVersion()));
862 errors->append(
error);
871 return typeLoader()->engine()->handle()->debugger() !=
nullptr;
876 return typeLoader()->engine()->handle()->diskCacheOptions()
882 return typeLoader()->engine()->handle()->diskCacheOptions()
888 const QV4::ExecutionEngine::DiskCacheOptions options
889 = typeLoader()->engine()->handle()->diskCacheOptions();
900 return updateQmldir(
data,
import, errors);
910 , m_mutex(m_thread->
mutex())
947 Q_ASSERT(!unNormalizedUrl.isRelative() &&
953 LockHolder<QQmlTypeLoader> holder(
this);
959 if (m_typeCache.
size() >= m_typeCacheTrimThreshold)
1001 LockHolder<QQmlTypeLoader> holder(
this);
1011 LockHolder<QQmlTypeLoader> holder(
this);
1014 blob->initializeFromNative(
value);
1015 blob->m_isDone =
true;
1017 m_scriptCache.
insert(relativeUrl, blob);
1022 LockHolder<QQmlTypeLoader> holder(
this);
1023 const auto it = m_scriptCache.
constFind(relativeUrl);
1024 return (
it != m_scriptCache.
constEnd() && (*it)->isNative())
1026 : QQmlRefPointer<QQmlScriptBlob>();
1034 Q_ASSERT(!unNormalizedUrl.isRelative() &&
1040 LockHolder<QQmlTypeLoader> holder(
this);
1055 scriptBlob->setCachedUnitStatus(
error);
1071 LockHolder<QQmlTypeLoader> holder(
this);
1107#if defined(Q_OS_ANDROID)
1124 LockHolder<QQmlTypeLoader> holder(
this);
1125 if (!m_importDirCache.
contains(dirPath)) {
1127 QCache<QString, bool> *
entry = exists ?
new QCache<QString, bool> :
nullptr;
1130 QCache<QString, bool> *fileSet = m_importDirCache.
object(dirPath);
1143 fileSet->insert(
fileName,
new bool(exists));
1156 const QChar nullChar(QChar::Null);
1157 if (
path.isEmpty() ||
path.contains(nullChar) ||
file.isEmpty() ||
file.contains(nullChar))
1162 LockHolder<QQmlTypeLoader> holder(
this);
1163 QCache<QString, bool> *fileSet = m_importDirCache.
object(
path);
1165 if (
bool *
value = fileSet->object(
file))
1172 auto addToCache = [&](
const QFileInfo &fileInfo) {
1174 fileSet = fileInfo.dir().exists() ?
new QCache<QString, bool> :
nullptr;
1180 const bool exists = fileInfo.exists();
1181 fileSet->insert(
file,
new bool(exists));
1196#if defined(Q_OS_ANDROID)
1224#if defined(Q_OS_ANDROID)
1239 LockHolder<QQmlTypeLoader> holder(
this);
1240 if (!m_importDirCache.
contains(dirPath)) {
1242 QCache<QString, bool> *
files = exists ?
new QCache<QString, bool> :
nullptr;
1246 QCache<QString, bool> *fileSet = m_importDirCache.
object(dirPath);
1247 return fileSet !=
nullptr;
1260 LockHolder<QQmlTypeLoader> holder(
this);
1272 filePath = filePathIn;
1276 if (
auto entry = m_importQmlDirCache.
value(filePathIn))
1288#define ERROR(description) { QQmlError e; e.setDescription(description); qmldir->setError(e); }
1289#define NOT_READABLE_ERROR QString(QLatin1String("module \"$$URI$$\" definition \"%1\" not readable"))
1290#define CASE_MISMATCH_ERROR QString(QLatin1String("cannot load module \"$$URI$$\": File name case mismatch for \"%1\""))
1303#undef NOT_READABLE_ERROR
1304#undef CASE_MISMATCH_ERROR
1306 m_importQmlDirCache.
insert(filePath, qmldir);
1318 m_importQmlDirCache.
insert(
url, qmldir);
1322 qmldir->setContent(
url, content);
1345 m_typeCache.
clear();
1347 m_scriptCache.
clear();
1348 m_qmldirCache.
clear();
1349 m_importDirCache.
clear();
1350 m_importQmlDirCache.
clear();
1351 m_checksumCache.
clear();
1354void QQmlTypeLoader::updateTypeCacheTrimThreshold()
1357 if (
size > m_typeCacheTrimThreshold)
1358 m_typeCacheTrimThreshold =
size * 2;
1359 if (
size < m_typeCacheTrimThreshold / 2)
1366 bool deletedOneType =
false;
1378 const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit
1379 = typeData->m_compiledData;
1380 if (compilationUnit) {
1381 if (compilationUnit->count()
1383 compilationUnit) + 1) {
1389 Q_ASSERT(compilationUnit->count() == 1);
1393 iter.value()->release();
1395 deletedOneType =
true;
1398 if (!deletedOneType)
1402 updateTypeCacheTrimThreshold();
1411 LockHolder<QQmlTypeLoader> holder(
const_cast<QQmlTypeLoader *
>(
this));
1417 LockHolder<QQmlTypeLoader> holder(
const_cast<QQmlTypeLoader *
>(
this));
bool contains(const Key &key) const noexcept
T * object(const Key &key) const noexcept
void clear() noexcept(std::is_nothrow_destructible_v< Node >)
bool insert(const Key &key, T *object, qsizetype cost=1)
static bool isRelativePath(const QString &path)
Returns true if path is relative; returns false if it is absolute.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString absoluteFilePath() const
bool isFile() const
Returns true if this object points to a file or to a symbolic link to a file.
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory.
bool exists() const
Returns true if the file system entry this QFileInfo refers to exists; otherwise returns false.
QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qsizetype size() const noexcept
Returns the number of items in the hash.
const_iterator constFind(const Key &key) const noexcept
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
iterator Iterator
Qt-style synonym for QHash::iterator.
iterator erase(const_iterator it)
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
T value(const Key &key) const noexcept
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
bool isEmpty() const noexcept
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
QVariant attribute(QNetworkRequest::Attribute code) const
Returns the attribute associated with the code code.
NetworkError error() const
Returns the error that was found during the processing of this request.
QUrl url() const
Returns the URL of the content downloaded or uploaded.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
@ RedirectionTargetAttribute
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QThread * thread() const
Returns the thread in which the object lives.
void deleteLater()
\threadsafe
The QQmlDataBlob encapsulates a data request that can be issued to a QQmlTypeLoader.
bool isError() const
Returns true if the status is Error.
virtual void dataReceived(const SourceCodeData &)=0
Invoked when data for the blob is received.
bool isCompleteOrError() const
Returns true if the status is Complete or Error.
bool isComplete() const
Returns true if the status is Complete.
QUrl url() const
Returns the physical url of the data.
virtual void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *)=0
Type
This enum describes the type of the data blob.
Status status() const
Returns the blob's status.
virtual void allDependenciesDone()
Called when all blobs waited for have completed.
bool isWaiting() const
Returns true if the status is WaitingForDependencies.
void startLoading()
Must be called before loading can occur.
Type type() const
Returns the type provided to the constructor.
void setError(const QQmlError &)
Mark this blob as having errors.
QString urlString() const
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlEngine class provides an environment for instantiating QML components.
QUrl interceptUrl(const QUrl &url, QQmlAbstractUrlInterceptor::DataType type) const
Run the current URL interceptors on the given url of the given type and return the result.
The QQmlError class encapsulates a QML error.
static bool isLocalFile(const QString &url)
Returns true if url is a local file that can be opened with \l{QFile}.
static bool isSynchronous(const QString &url)
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to \l{QFile}.
The QQmlImportDatabase class manages the QML imports for a QQmlEngine.
LocalQmldirSearchLocation
QStringList importPathList(PathType type=LocalOrRemote) const
LocalQmldirResult locateLocalQmldir(const QString &uri, QTypeRevision version, LocalQmldirSearchLocation location, const Callback &callback)
@ QmldirInterceptedToRemote
The QQmlImports class encapsulates one QML document's import statements.
static QUrl urlFromLocalFileOrQrcOrUrl(const QString &)
static bool isLocal(const QString &url)
static QStringList completeQmldirPaths(const QString &uri, const QStringList &basePaths, QTypeRevision version)
Forms complete paths to a qmldir file, from a base URL, a module URI and version specification.
bool isThisThread() const
void waitForNextMessage()
QQmlDirScripts scripts() const
QString typeNamespace() const
QQmlDirPlugins plugins() const
void loadAsync(const QQmlDataBlob::Ptr &b)
void callDownloadProgressChanged(const QQmlDataBlob::Ptr &b, qreal p)
void initializeEngine(QQmlExtensionInterface *, const char *)
void loadWithCachedUnit(const QQmlDataBlob::Ptr &b, const QQmlPrivate::CachedQmlUnit *unit)
void load(const QQmlDataBlob::Ptr &b)
void loadWithStaticDataAsync(const QQmlDataBlob::Ptr &b, const QByteArray &)
void loadWithCachedUnitAsync(const QQmlDataBlob::Ptr &b, const QQmlPrivate::CachedQmlUnit *unit)
void loadWithStaticData(const QQmlDataBlob::Ptr &b, const QByteArray &)
std::shared_ptr< PendingImport > PendingImportPtr
Blob(const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader)
bool readCacheFile() const
QQmlMetaType::CacheMode aotCacheMode() const
bool addImport(const QV4::CompiledData::Import *import, QQmlImports::ImportFlags, QList< QQmlError > *errors)
bool fetchQmldir(const QUrl &url, PendingImportPtr import, int priority, QList< QQmlError > *errors)
bool writeCacheFile() const
virtual bool qmldirDataAvailable(const QQmlRefPointer< QQmlQmldirData > &, QList< QQmlError > *)
void dependencyComplete(QQmlDataBlob *) override
Called if blob, which was previously waited for, has completed.
bool updateQmldir(const QQmlRefPointer< QQmlQmldirData > &data, const PendingImportPtr &import, QList< QQmlError > *errors)
void setCachedUnitStatus(QQmlMetaType::CachedUnitLookupError status)
void importQmldirScripts(const PendingImportPtr &import, const QQmlTypeLoaderQmldirContent &qmldir, const QUrl &qmldirUrl)
bool loadDependentImports(const QList< QQmlDirParser::Import > &imports, const QString &qualifier, QTypeRevision version, quint16 precedence, QQmlImports::ImportFlags flags, QList< QQmlError > *errors)
QQmlRefPointer< QQmlImports > m_importCache
The QQmlTypeLoader class abstracts loading files and their dependencies over the network.
QQmlRefPointer< QQmlScriptBlob > injectedScript(const QUrl &relativeUrl)
quintptr profiler() const
bool isTypeLoaded(const QUrl &url) const
QQmlEngine * engine() const
Return the QQmlEngine associated with this loader.
QQmlRefPointer< QQmlTypeData > getType(const QUrl &unNormalizedUrl, Mode mode=PreferSynchronous)
Returns a QQmlTypeData for the specified url.
void load(QQmlDataBlob *, Mode=PreferSynchronous)
Load the provided blob from the network or filesystem.
bool isScriptLoaded(const QUrl &url) const
QString absoluteFilePath(const QString &path)
Returns the absolute filename of path via a directory cache.
~QQmlTypeLoader()
Destroys the type loader, first clearing the cache of any information about loaded files.
QQmlImportDatabase * importDatabase() const
friend struct StaticLoader
void injectScript(const QUrl &relativeUrl, const QV4::Value &value)
void loadWithCachedUnit(QQmlDataBlob *blob, const QQmlPrivate::CachedQmlUnit *unit, Mode mode=PreferSynchronous)
void loadWithStaticData(QQmlDataBlob *, const QByteArray &, Mode=PreferSynchronous)
Load the provided blob with data.
bool directoryExists(const QString &path)
Returns true if the path is a directory via a directory cache.
static QUrl normalize(const QUrl &unNormalizedUrl)
QQmlRefPointer< QQmlScriptBlob > getScript(const QUrl &unNormalizedUrl)
Return a QQmlScriptBlob for url.
QQmlTypeLoader(QQmlEngine *)
Constructs a new type loader that uses the given engine.
friend struct PlainLoader
void setProfiler(quintptr)
void initializeEngine(QQmlEngineExtensionInterface *, const char *)
QQmlRefPointer< QQmlQmldirData > getQmldir(const QUrl &)
Returns a QQmlQmldirData for url.
const QQmlTypeLoaderQmldirContent qmldirContent(const QString &filePath)
Return a QQmlTypeLoaderQmldirContent for absoluteFilePath.
void clearCache()
Clears cached information about loaded files, including any type data, scripts and qmldir information...
friend struct CachedLoader
void setQmldirContent(const QString &filePath, const QString &content)
bool fileExists(const QString &path, const QString &file)
void insert(const K &, const T &)
T * value(const K &) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString left(qsizetype n) const &
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
qsizetype size() const noexcept
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString first(qsizetype n) const &
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QString last(qsizetype n) const &
static QThread * currentThread()
constexpr bool hasMajorVersion() const
Returns true if the major version is known, otherwise false.
constexpr bool isValid() const
Returns true if the major version or the minor version is known, otherwise false.
QUrl resolved(const QUrl &relative) const
Returns the result of the merge of this URL with relative.
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
QString scheme() const
Returns the scheme of the URL.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
QUrl toUrl() const
Returns the variant as a QUrl if the variant has userType() \l QMetaType::QUrl; otherwise returns an ...
qDeleteAll(list.begin(), list.end())
QSet< QString >::iterator it
Path qmldirFilePath(const QString &path)
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qCDebug(category,...)
constexpr const T & qMax(const T &a, const T &b)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLchar *const * path
GLint GLenum GLboolean normalized
bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn)
Returns true if the case of fileName is equivalent to the file case of fileName on disk,...
const QLoggingCategory & lcQmlImport()
static void setError(QJsonObject *response, const QString &msg)
#define ASSERT_LOADTHREAD()
#define CASE_MISMATCH_ERROR
static void addDependencyImportError(const QQmlTypeLoader::Blob::PendingImportPtr &import, QList< QQmlError > *errors)
void doInitializeEngine(Interface *iface, QQmlTypeLoaderThread *thread, QQmlEngine *engine, const char *uri)
#define ERROR(description)
#define NOT_READABLE_ERROR
#define DATALOADER_MAXIMUM_REDIRECT_RECURSION
#define TYPELOADER_MINIMUM_TRIM_THRESHOLD
void postProcessQmldir(QQmlTypeLoader::Blob *self, const QQmlTypeLoader::Blob::PendingImportPtr &import, const QString &qmldirFilePath, const URL &qmldirUrl)
#define qPrintable(string)
QLatin1StringView QLatin1String
#define Q_TRACE_SCOPE(x,...)
#define Q_TRACE_POINT(provider, tracepoint,...)
QUrl url("example.com")
[constructor-url-reference]
void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
CachedLoader(const QQmlPrivate::CachedQmlUnit *unit)
void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
const QQmlPrivate::CachedQmlUnit * unit
void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
\inmodule QtCore \reentrant
StaticLoader(const QByteArray &data)
void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const