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
qqmljscompiler_p.h File Reference

(8bf5aae19b77b618f3f7a55a59e87c8a319475a8)

#include <qtqmlcompilerexports.h>
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
#include <QtCore/qloggingcategory.h>
#include <private/qqmlirbuilder_p.h>
#include <private/qqmljscompilepass_p.h>
#include <private/qqmljsdiagnosticmessage_p.h>
#include <private/qqmljsimporter_p.h>
#include <private/qqmljslogger_p.h>
#include <private/qqmljstyperesolver_p.h>
#include <private/qv4compileddata_p.h>
#include <functional>
+ Include dependency graph for qqmljscompiler_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QQmlJSCompileError
 
struct  QQmlJSAotFunction
 
class  QQmlJSAotCompiler
 

Typedefs

using QQmlJSAotFunctionMap = QMap<int, QQmlJSAotFunction>
 
using QQmlJSSaveFunction
 

Functions

QT_BEGIN_NAMESPACE Q_QMLCOMPILER_EXPORT Q_DECLARE_LOGGING_CATEGORY (lcAotCompiler)
 
 Q_DECLARE_OPERATORS_FOR_FLAGS (QQmlJSAotCompiler::Flags)
 
bool Q_QMLCOMPILER_EXPORT qCompileQmlFile (const QString &inputFileName, QQmlJSSaveFunction saveFunction, QQmlJSAotCompiler *aotCompiler, QQmlJSCompileError *error, bool storeSourceLocation=false, QV4::Compiler::CodegenWarningInterface *interface=QV4::Compiler::defaultCodegenWarningInterface(), const QString *fileContents=nullptr)
 
bool Q_QMLCOMPILER_EXPORT qCompileQmlFile (QmlIR::Document &irDocument, const QString &inputFileName, QQmlJSSaveFunction saveFunction, QQmlJSAotCompiler *aotCompiler, QQmlJSCompileError *error, bool storeSourceLocation=false, QV4::Compiler::CodegenWarningInterface *interface=QV4::Compiler::defaultCodegenWarningInterface(), const QString *fileContents=nullptr)
 
bool Q_QMLCOMPILER_EXPORT qCompileJSFile (const QString &inputFileName, const QString &inputFileUrl, QQmlJSSaveFunction saveFunction, QQmlJSCompileError *error)
 
bool Q_QMLCOMPILER_EXPORT qSaveQmlJSUnitAsCpp (const QString &inputFileName, const QString &outputFileName, const QV4::CompiledData::SaveableUnitPointer &unit, const QQmlJSAotFunctionMap &aotFunctions, QString *errorString)
 

Typedef Documentation

◆ QQmlJSAotFunctionMap

Definition at line 107 of file qqmljscompiler_p.h.

◆ QQmlJSSaveFunction

Initial value:
std::function<bool(const QV4::CompiledData::SaveableUnitPointer &,
Definition qmap.h:187
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129

Definition at line 108 of file qqmljscompiler_p.h.

Function Documentation

◆ Q_DECLARE_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_QMLCOMPILER_EXPORT Q_DECLARE_LOGGING_CATEGORY ( lcAotCompiler )

◆ Q_DECLARE_OPERATORS_FOR_FLAGS()

Q_DECLARE_OPERATORS_FOR_FLAGS ( QQmlJSAotCompiler::Flags )

◆ qCompileJSFile()

bool Q_QMLCOMPILER_EXPORT qCompileJSFile ( const QString & inputFileName,
const QString & inputFileUrl,
QQmlJSSaveFunction saveFunction,
QQmlJSCompileError * error )

Definition at line 375 of file qqmljscompiler.cpp.

References QV4::Compiler::Codegen::compileModule(), QString::endsWith(), engine, error, QString::fromUtf8(), QRandomGenerator::generate(), generator, QFileDevice::NoError, Q_ASSERT, qScopeGuard(), QStringLiteral, QIODeviceBase::ReadOnly, QV4::Compiler::ScriptImportedByQML, QQmlJS::Lexer::setCode(), and url.

+ Here is the call graph for this function:

◆ qCompileQmlFile() [1/2]

bool Q_QMLCOMPILER_EXPORT qCompileQmlFile ( const QString & inputFileName,
QQmlJSSaveFunction saveFunction,
QQmlJSAotCompiler * aotCompiler,
QQmlJSCompileError * error,
bool storeSourceLocation = false,
QV4::Compiler::CodegenWarningInterface * interface = QV4::Compiler::defaultCodegenWarningInterface(),
const QString * fileContents = nullptr )

Definition at line 181 of file qqmljscompiler.cpp.

References error, interface, and qCompileQmlFile().

Referenced by QQmlJSLinter::lintFile(), and qCompileQmlFile().

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

◆ qCompileQmlFile() [2/2]

bool Q_QMLCOMPILER_EXPORT qCompileQmlFile ( QmlIR::Document & irDocument,
const QString & inputFileName,
QQmlJSSaveFunction saveFunction,
QQmlJSAotCompiler * aotCompiler,
QQmlJSCompileError * error,
bool storeSourceLocation = false,
QV4::Compiler::CodegenWarningInterface * interface = QV4::Compiler::defaultCodegenWarningInterface(),
const QString * fileContents = nullptr )

◆ qSaveQmlJSUnitAsCpp()

bool Q_QMLCOMPILER_EXPORT qSaveQmlJSUnitAsCpp ( const QString & inputFileName,
const QString & outputFileName,
const QV4::CompiledData::SaveableUnitPointer & unit,
const QQmlJSAotFunctionMap & aotFunctions,
QString * errorString )

Definition at line 469 of file qqmljscompiler.cpp.

References arg, begin(), QByteArray::constData(), FileScopeCodeIndex, QString::fromUtf8(), funcHeaderCode, Qt::hex(), it, QByteArrayLiteral, qQmlJSSymbolNamespaceForPath(), QStringLiteral, QV4::CompiledData::SaveableUnitPointer::saveToDisk(), QString::toUtf8(), QIODeviceBase::Truncate, QIODeviceBase::WriteOnly, and writeStr().

+ Here is the call graph for this function: