aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qmlcompiler/CMakeLists.txt2
-rw-r--r--src/qmlcompiler/qcoloroutput_p.h4
-rw-r--r--src/qmlcompiler/qdeferredpointer_p.h6
-rw-r--r--src/qmlcompiler/qqmljscompiler_p.h54
-rw-r--r--src/qmlcompiler/qqmljsimporter_p.h4
-rw-r--r--src/qmlcompiler/qqmljsimportvisitor_p.h4
-rw-r--r--src/qmlcompiler/qqmljslinter_p.h4
-rw-r--r--src/qmlcompiler/qqmljsloadergenerator_p.h10
-rw-r--r--src/qmlcompiler/qqmljslogger_p.h8
-rw-r--r--src/qmlcompiler/qqmljsmetatypes_p.h12
-rw-r--r--src/qmlcompiler/qqmljsresourcefilemapper_p.h4
-rw-r--r--src/qmlcompiler/qqmljsscope_p.h6
-rw-r--r--src/qmlcompiler/qqmljstypedescriptionreader_p.h4
-rw-r--r--src/qmlcompiler/qqmljstyperesolver_p.h4
-rw-r--r--src/qmlcompiler/qresourcerelocater_p.h4
-rw-r--r--tools/qmlcachegen/qmlcachegen.cpp4
16 files changed, 83 insertions, 51 deletions
diff --git a/src/qmlcompiler/CMakeLists.txt b/src/qmlcompiler/CMakeLists.txt
index 59d8bf8a98..3cf3eee22a 100644
--- a/src/qmlcompiler/CMakeLists.txt
+++ b/src/qmlcompiler/CMakeLists.txt
@@ -3,8 +3,8 @@
#####################################################################
qt_internal_add_module(QmlCompilerPrivate
- STATIC
INTERNAL_MODULE
+ GENERATE_CPP_EXPORTS
SOURCES
qcoloroutput_p.h qcoloroutput.cpp
qdeferredpointer_p.h
diff --git a/src/qmlcompiler/qcoloroutput_p.h b/src/qmlcompiler/qcoloroutput_p.h
index 608111db48..fbba19d775 100644
--- a/src/qmlcompiler/qcoloroutput_p.h
+++ b/src/qmlcompiler/qcoloroutput_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtCore/private/qglobal_p.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qstring.h>
@@ -47,7 +49,7 @@ QT_BEGIN_NAMESPACE
class QColorOutputPrivate;
-class QColorOutput
+class Q_QMLCOMPILER_EXPORT QColorOutput
{
enum
{
diff --git a/src/qmlcompiler/qdeferredpointer_p.h b/src/qmlcompiler/qdeferredpointer_p.h
index 5c496529ba..6c9e380100 100644
--- a/src/qmlcompiler/qdeferredpointer_p.h
+++ b/src/qmlcompiler/qdeferredpointer_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtCore/private/qglobal_p.h>
#include <QtCore/qsharedpointer.h>
@@ -56,7 +58,7 @@ template<typename T>
class QDeferredWeakPointer;
template<typename T>
-class QDeferredSharedPointer
+class Q_QMLCOMPILER_EXPORT QDeferredSharedPointer
{
public:
using Factory = QDeferredFactory<std::remove_const_t<T>>;
@@ -186,7 +188,7 @@ private:
};
template<typename T>
-class QDeferredWeakPointer
+class Q_QMLCOMPILER_EXPORT QDeferredWeakPointer
{
public:
using Factory = QDeferredFactory<std::remove_const_t<T>>;
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
diff --git a/src/qmlcompiler/qqmljsimporter_p.h b/src/qmlcompiler/qqmljsimporter_p.h
index cacc8eeb9b..9351dabf28 100644
--- a/src/qmlcompiler/qqmljsimporter_p.h
+++ b/src/qmlcompiler/qqmljsimporter_p.h
@@ -39,13 +39,15 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include "qqmljsscope_p.h"
#include "qqmljsresourcefilemapper_p.h"
#include <QtQml/private/qqmldirparser_p.h>
QT_BEGIN_NAMESPACE
-class QQmlJSImporter
+class Q_QMLCOMPILER_EXPORT QQmlJSImporter
{
public:
using ImportedTypes = QHash<QString, QQmlJSImportedScope>;
diff --git a/src/qmlcompiler/qqmljsimportvisitor_p.h b/src/qmlcompiler/qqmljsimportvisitor_p.h
index 00b4d65d3d..d8c33155c3 100644
--- a/src/qmlcompiler/qqmljsimportvisitor_p.h
+++ b/src/qmlcompiler/qqmljsimportvisitor_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include "qqmljsannotation_p.h"
#include "qqmljsimporter_p.h"
#include "qqmljslogger_p.h"
@@ -56,7 +58,7 @@
QT_BEGIN_NAMESPACE
struct QQmlJSResourceFileMapper;
-class QQmlJSImportVisitor : public QQmlJS::AST::Visitor
+class Q_QMLCOMPILER_EXPORT QQmlJSImportVisitor : public QQmlJS::AST::Visitor
{
public:
QQmlJSImportVisitor(QQmlJSImporter *importer, QQmlJSLogger *logger,
diff --git a/src/qmlcompiler/qqmljslinter_p.h b/src/qmlcompiler/qqmljslinter_p.h
index 637d7a911a..d26802aa41 100644
--- a/src/qmlcompiler/qqmljslinter_p.h
+++ b/src/qmlcompiler/qqmljslinter_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtQmlCompiler/private/qqmljslogger_p.h>
#include <QtQmlCompiler/private/qqmljsimporter_p.h>
@@ -53,7 +55,7 @@
QT_BEGIN_NAMESPACE
-class QQmlJSLinter
+class Q_QMLCOMPILER_EXPORT QQmlJSLinter
{
public:
QQmlJSLinter(const QStringList &importPaths, bool useAbsolutePath = false);
diff --git a/src/qmlcompiler/qqmljsloadergenerator_p.h b/src/qmlcompiler/qqmljsloadergenerator_p.h
index 80e086dc64..30b68199b1 100644
--- a/src/qmlcompiler/qqmljsloadergenerator_p.h
+++ b/src/qmlcompiler/qqmljsloadergenerator_p.h
@@ -39,15 +39,19 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
#include <QtCore/private/qglobal_p.h>
QT_BEGIN_NAMESPACE
-bool qQmlJSGenerateLoader(const QStringList &compiledFiles, const QString &outputFileName,
- const QStringList &resourceFileMappings, QString *errorString);
-QString qQmlJSSymbolNamespaceForPath(const QString &relativePath);
+bool Q_QMLCOMPILER_EXPORT qQmlJSGenerateLoader(const QStringList &compiledFiles,
+ const QString &outputFileName,
+ const QStringList &resourceFileMappings,
+ QString *errorString);
+QString Q_QMLCOMPILER_EXPORT qQmlJSSymbolNamespaceForPath(const QString &relativePath);
QT_END_NAMESPACE
diff --git a/src/qmlcompiler/qqmljslogger_p.h b/src/qmlcompiler/qqmljslogger_p.h
index 2ddcb2ac5a..436edd2ad1 100644
--- a/src/qmlcompiler/qqmljslogger_p.h
+++ b/src/qmlcompiler/qqmljslogger_p.h
@@ -40,6 +40,8 @@
// We mean it.
//
+#include <qtqmlcompilerexports.h>
+
#include "qcoloroutput_p.h"
#include <private/qqmljsdiagnosticmessage_p.h>
@@ -58,7 +60,7 @@ QT_BEGIN_NAMESPACE
\internal
Used to print the the line containing the location of a certain error
*/
-class IssueLocationWithContext
+class Q_QMLCOMPILER_EXPORT IssueLocationWithContext
{
public:
/*!
@@ -115,7 +117,7 @@ enum QQmlJSLoggerCategory {
QQmlJSLoggerCategory_Last = Log_AttachedPropertyReuse
};
-struct FixSuggestion
+struct Q_QMLCOMPILER_EXPORT FixSuggestion
{
struct Fix
{
@@ -135,7 +137,7 @@ struct Message : public QQmlJS::DiagnosticMessage
std::optional<FixSuggestion> fixSuggestion;
};
-class QQmlJSLogger
+class Q_QMLCOMPILER_EXPORT QQmlJSLogger
{
Q_DISABLE_COPY_MOVE(QQmlJSLogger)
public:
diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h
index 2b4083210e..fdfd64b0d4 100644
--- a/src/qmlcompiler/qqmljsmetatypes_p.h
+++ b/src/qmlcompiler/qqmljsmetatypes_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qsharedpointer.h>
@@ -61,7 +63,7 @@ QT_BEGIN_NAMESPACE
class QQmlJSTypeResolver;
class QQmlJSScope;
-class QQmlJSMetaEnum
+class Q_QMLCOMPILER_EXPORT QQmlJSMetaEnum
{
QStringList m_keys;
QList<int> m_values; // empty if values unknown.
@@ -119,7 +121,7 @@ public:
}
};
-class QQmlJSMetaMethod
+class Q_QMLCOMPILER_EXPORT QQmlJSMetaMethod
{
public:
enum Type {
@@ -263,7 +265,7 @@ private:
bool m_isImplicitQmlPropertyChangeSignal = false;
};
-class QQmlJSMetaProperty
+class Q_QMLCOMPILER_EXPORT QQmlJSMetaProperty
{
QString m_propertyName;
QString m_typeName;
@@ -370,7 +372,7 @@ public:
create a new binding, you know all the details of it already, so you should
just set all the data at once.
*/
-class QQmlJSMetaPropertyBinding
+class Q_QMLCOMPILER_EXPORT QQmlJSMetaPropertyBinding
{
public:
enum BindingType : unsigned int {
@@ -672,7 +674,7 @@ public:
}
};
-struct QQmlJSMetaSignalHandler
+struct Q_QMLCOMPILER_EXPORT QQmlJSMetaSignalHandler
{
QStringList signalParameters;
bool isMultiline;
diff --git a/src/qmlcompiler/qqmljsresourcefilemapper_p.h b/src/qmlcompiler/qqmljsresourcefilemapper_p.h
index d7eda83b85..931e9e6fe8 100644
--- a/src/qmlcompiler/qqmljsresourcefilemapper_p.h
+++ b/src/qmlcompiler/qqmljsresourcefilemapper_p.h
@@ -38,6 +38,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QStringList>
#include <QHash>
#include <QFile>
@@ -45,7 +47,7 @@
QT_BEGIN_NAMESPACE
-struct QQmlJSResourceFileMapper
+struct Q_QMLCOMPILER_EXPORT QQmlJSResourceFileMapper
{
struct Entry
{
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index 7043e7b235..1bbb70b2ca 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include "qqmljsmetatypes_p.h"
#include "qdeferredpointer_p.h"
#include "qqmljsannotation_p.h"
@@ -57,7 +59,7 @@ QT_BEGIN_NAMESPACE
class QQmlJSImporter;
-class QQmlJSScope
+class Q_QMLCOMPILER_EXPORT QQmlJSScope
{
public:
QQmlJSScope(QQmlJSScope &&) = default;
@@ -561,7 +563,7 @@ private:
Q_DECLARE_TYPEINFO(QQmlJSScope::QmlIRCompatibilityBindingData, Q_RELOCATABLE_TYPE);
template<>
-class QDeferredFactory<QQmlJSScope>
+class Q_QMLCOMPILER_EXPORT QDeferredFactory<QQmlJSScope>
{
public:
QDeferredFactory() = default;
diff --git a/src/qmlcompiler/qqmljstypedescriptionreader_p.h b/src/qmlcompiler/qqmljstypedescriptionreader_p.h
index 647271c2e6..73777039f5 100644
--- a/src/qmlcompiler/qqmljstypedescriptionreader_p.h
+++ b/src/qmlcompiler/qqmljstypedescriptionreader_p.h
@@ -29,6 +29,8 @@
#ifndef QQMLJSTYPEDESCRIPTIONREADER_P_H
#define QQMLJSTYPEDESCRIPTIONREADER_P_H
+#include <qtqmlcompilerexports.h>
+
//
// W A R N I N G
// -------------
@@ -48,7 +50,7 @@
QT_BEGIN_NAMESPACE
-class QQmlJSTypeDescriptionReader
+class Q_QMLCOMPILER_EXPORT QQmlJSTypeDescriptionReader
{
Q_DECLARE_TR_FUNCTIONS(QQmlJSTypeDescriptionReader)
public:
diff --git a/src/qmlcompiler/qqmljstyperesolver_p.h b/src/qmlcompiler/qqmljstyperesolver_p.h
index 4426a31f86..095e04f999 100644
--- a/src/qmlcompiler/qqmljstyperesolver_p.h
+++ b/src/qmlcompiler/qqmljstyperesolver_p.h
@@ -39,6 +39,8 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <private/qqmlirbuilder_p.h>
#include <private/qqmljsast_p.h>
#include <private/qqmljsimporter_p.h>
@@ -50,7 +52,7 @@
QT_BEGIN_NAMESPACE
class QQmlJSImportVisitor;
-class QQmlJSTypeResolver
+class Q_QMLCOMPILER_EXPORT QQmlJSTypeResolver
{
public:
enum BaseOrExtension { Base, Extension };
diff --git a/src/qmlcompiler/qresourcerelocater_p.h b/src/qmlcompiler/qresourcerelocater_p.h
index 9e7eded11f..1c56aa491f 100644
--- a/src/qmlcompiler/qresourcerelocater_p.h
+++ b/src/qmlcompiler/qresourcerelocater_p.h
@@ -39,12 +39,14 @@
//
// We mean it.
+#include <qtqmlcompilerexports.h>
+
#include <QtCore/qstring.h>
#include <QtCore/private/qglobal_p.h>
QT_BEGIN_NAMESPACE
-int qRelocateResourceFile(const QString &input, const QString &output);
+int Q_QMLCOMPILER_EXPORT qRelocateResourceFile(const QString &input, const QString &output);
QT_END_NAMESPACE
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp
index 7a715d5d13..7c00c4f0c7 100644
--- a/tools/qmlcachegen/qmlcachegen.cpp
+++ b/tools/qmlcachegen/qmlcachegen.cpp
@@ -49,10 +49,6 @@
#include <algorithm>
-QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(lcAotCompiler);
-QT_END_NAMESPACE
-
static bool argumentsFromCommandLineAndFile(QStringList& allArguments, const QStringList &arguments)
{
allArguments.reserve(arguments.size());