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
qqmltypeloader.cpp File Reference

(0a3290f2288695a2b05ae3824c18d01abe4195e0)

#include <private/qqmltypeloader_p.h>
#include <private/qqmldirdata_p.h>
#include <private/qqmlprofiler_p.h>
#include <private/qqmlscriptblob_p.h>
#include <private/qqmltypedata_p.h>
#include <private/qqmltypeloaderqmldircontent_p.h>
#include <private/qqmltypeloaderthread_p.h>
#include <private/qqmlsourcecoordinate_p.h>
#include <QtQml/qqmlabstracturlinterceptor.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlextensioninterface.h>
#include <QtQml/qqmlfile.h>
#include <qtqml_tracepoints_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qdiriterator.h>
#include <QtCore/qfile.h>
#include <QtCore/qthread.h>
#include <functional>
+ Include dependency graph for qqmltypeloader.cpp:

Go to the source code of this file.

Classes

struct  QT_BEGIN_NAMESPACE::LockHolder< LockType >
 
struct  PlainLoader
 
struct  StaticLoader
 
struct  CachedLoader
 

Namespaces

namespace  QT_BEGIN_NAMESPACE
 Combined button and popup list for selecting options.
 

Macros

#define ASSERT_LOADTHREAD()
 
#define DATALOADER_MAXIMUM_REDIRECT_RECURSION   16
 
#define TYPELOADER_MINIMUM_TRIM_THRESHOLD   64
 
#define ERROR(description)   { QQmlError e; e.setDescription(description); qmldir->setError(e); }
 
#define NOT_READABLE_ERROR   QString(QLatin1String("module \"$$URI$$\" definition \"%1\" not readable"))
 
#define CASE_MISMATCH_ERROR   QString(QLatin1String("cannot load module \"$$URI$$\": File name case mismatch for \"%1\""))
 

Functions

template<class Interface >
void doInitializeEngine (Interface *iface, QQmlTypeLoaderThread *thread, QQmlEngine *engine, const char *uri)
 
template<typename URL >
void postProcessQmldir (QQmlTypeLoader::Blob *self, const QQmlTypeLoader::Blob::PendingImportPtr &import, const QString &qmldirFilePath, const URL &qmldirUrl)
 
static void addDependencyImportError (const QQmlTypeLoader::Blob::PendingImportPtr &import, QList< QQmlError > *errors)
 

Macro Definition Documentation

◆ ASSERT_LOADTHREAD

#define ASSERT_LOADTHREAD ( )

Definition at line 32 of file qqmltypeloader.cpp.

◆ CASE_MISMATCH_ERROR

#define CASE_MISMATCH_ERROR   QString(QLatin1String("cannot load module \"$$URI$$\": File name case mismatch for \"%1\""))

◆ DATALOADER_MAXIMUM_REDIRECT_RECURSION

#define DATALOADER_MAXIMUM_REDIRECT_RECURSION   16

Definition at line 284 of file qqmltypeloader.cpp.

◆ ERROR

#define ERROR ( description)    { QQmlError e; e.setDescription(description); qmldir->setError(e); }

◆ NOT_READABLE_ERROR

#define NOT_READABLE_ERROR   QString(QLatin1String("module \"$$URI$$\" definition \"%1\" not readable"))

◆ TYPELOADER_MINIMUM_TRIM_THRESHOLD

#define TYPELOADER_MINIMUM_TRIM_THRESHOLD   64

Definition at line 287 of file qqmltypeloader.cpp.

Referenced by QQmlTypeLoader::clearCache().

Function Documentation

◆ addDependencyImportError()

static void addDependencyImportError ( const QQmlTypeLoader::Blob::PendingImportPtr & import,
QList< QQmlError > * errors )
static

Definition at line 605 of file qqmltypeloader.cpp.

References arg, error, QString::first(), QString::last(), QString::number(), and QString::size().

+ Here is the call graph for this function:

◆ doInitializeEngine()

template<class Interface >
void doInitializeEngine ( Interface * iface,
QQmlTypeLoaderThread * thread,
QQmlEngine * engine,
const char * uri )

Call the initializeEngine() method on iface. Used by QQmlImportDatabase to ensure it gets called in the correct thread.

Definition at line 360 of file qqmltypeloader.cpp.

References QThread::currentThread(), engine, QQmlTypeLoaderThread::initializeEngine(), QQmlThread::isThisThread(), Q_ASSERT, and QObject::thread().

Referenced by QQmlTypeLoader::initializeEngine(), and QQmlTypeLoader::initializeEngine().

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

◆ postProcessQmldir()

template<typename URL >
void postProcessQmldir ( QQmlTypeLoader::Blob * self,
const QQmlTypeLoader::Blob::PendingImportPtr & import,
const QString & qmldirFilePath,
const URL & qmldirUrl )

Definition at line 504 of file qqmltypeloader.cpp.

References QList< T >::isEmpty(), QQmlTypeLoaderQmldirContent::plugins(), QQmlMetaType::qmlRegisterModuleTypes(), and QQmlTypeLoaderQmldirContent::typeNamespace().

Referenced by QQmlTypeLoader::Blob::updateQmldir().

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