diff options
| author | Maximilian Goldstein <max.goldstein@qt.io> | 2022-03-24 15:37:56 +0100 |
|---|---|---|
| committer | Maximilian Goldstein <max.goldstein@qt.io> | 2022-03-25 13:12:32 +0100 |
| commit | dc6b39fb2e30705a8a46569a60094370a641f82d (patch) | |
| tree | a8072a162b6a9cd38d43ccb48e90a3ae3c9cc1b8 /src/qmlcompiler/qqmljscompiler_p.h | |
| parent | a7d3ac7c2d46c7a56d2472e4fc7f8964d454f9a1 (diff) | |
Turn qmlcompiler into a shared library
Converts qmlcompiler into a shared library so it isn't duplicated when
statically linked in tools and so that plugins can link against it.
Change-Id: I91e13cc588796f71a5463dbdce21e42a74120565
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler_p.h')
| -rw-r--r-- | src/qmlcompiler/qqmljscompiler_p.h | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/src/qmlcompiler/qqmljscompiler_p.h b/src/qmlcompiler/qqmljscompiler_p.h index d92f75f524..7d76cb46c2 100644 --- a/src/qmlcompiler/qqmljscompiler_p.h +++ b/src/qmlcompiler/qqmljscompiler_p.h @@ -39,8 +39,11 @@ // // We mean it. +#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> @@ -54,7 +57,9 @@ QT_BEGIN_NAMESPACE -struct QQmlJSCompileError +Q_QMLCOMPILER_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcAotCompiler); + +struct Q_QMLCOMPILER_EXPORT QQmlJSCompileError { QString message; void print(); @@ -65,7 +70,7 @@ struct QQmlJSCompileError const QQmlJS::DiagnosticMessage &diagnostic); }; -struct QQmlJSAotFunction +struct Q_QMLCOMPILER_EXPORT QQmlJSAotFunction { QStringList includes; QStringList argumentTypes; @@ -73,7 +78,7 @@ struct QQmlJSAotFunction QString returnType; }; -class QQmlJSAotCompiler +class Q_QMLCOMPILER_EXPORT QQmlJSAotCompiler { public: QQmlJSAotCompiler(QQmlJSImporter *importer, const QString &resourcePath, @@ -120,26 +125,29 @@ using QQmlJSSaveFunction = std::function<bool(const QV4::CompiledData::SaveableUnitPointer &, const QQmlJSAotFunctionMap &, QString *)>; -bool 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 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 qCompileJSFile(const QString &inputFileName, const QString &inputFileUrl, - QQmlJSSaveFunction saveFunction, QQmlJSCompileError *error); - - -bool qSaveQmlJSUnitAsCpp(const QString &inputFileName, const QString &outputFileName, - const QV4::CompiledData::SaveableUnitPointer &unit, - const QQmlJSAotFunctionMap &aotFunctions, - QString *errorString); +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); QT_END_NAMESPACE |
