diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-08-29 16:53:40 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-09-01 09:20:40 +0000 |
commit | d82460f5a50527f5dd980ccb3bcd1782b5f84560 (patch) | |
tree | 246af2b908afcf3a8850c35f7c4a6cfd7861da68 | |
parent | 124839dcf91cab4772c355a0469fd35ab7645602 (diff) |
QmlCompiler: Change it to public module
It now has public API, and users shouldn't need to link against
QmlCompilerPrivate to gain access to that API.
Change some includes to avoid syncqt complaints, and remove a
superfluous const to avoid pedantic warnings.
Change-Id: I00ac8713f6bd9d1437300bc833cf16b62216caa0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit ac5c7d52737489b2b63071e1003ef2d72e8eb8ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qmlcompiler/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsloggingutils.h | 6 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsloggingutils_p.h | 1 | ||||
-rw-r--r-- | src/qmlcompiler/qqmlsa.h | 10 |
4 files changed, 19 insertions, 12 deletions
diff --git a/src/qmlcompiler/CMakeLists.txt b/src/qmlcompiler/CMakeLists.txt index b7476a96c2..ad814d8b47 100644 --- a/src/qmlcompiler/CMakeLists.txt +++ b/src/qmlcompiler/CMakeLists.txt @@ -5,8 +5,7 @@ ## QmlCompilerPrivate Module: ##################################################################### -qt_internal_add_module(QmlCompilerPrivate - INTERNAL_MODULE +qt_internal_add_module(QmlCompiler GENERATE_CPP_EXPORTS GENERATE_PRIVATE_CPP_EXPORTS PLUGIN_TYPES qmllint @@ -44,11 +43,16 @@ qt_internal_add_module(QmlCompilerPrivate qqmlsaconstants.h qqmlsasourcelocation.h qqmlsasourcelocation.cpp qqmlsasourcelocation_p.h PUBLIC_LIBRARIES - Qt::CorePrivate + Qt::Core + Qt::Qml + LIBRARIES Qt::QmlPrivate + PRIVATE_MODULE_INTERFACE + Qt::QmlPrivate + ) -qt_internal_add_resource(QmlCompilerPrivate "builtins" +qt_internal_add_resource(QmlCompiler "builtins" PREFIX "/qt-project.org/qml/builtins" BASE @@ -58,6 +62,6 @@ qt_internal_add_resource(QmlCompilerPrivate "builtins" "${CMAKE_CURRENT_SOURCE_DIR}/../imports/builtins/jsroot.qmltypes" ) -qt_internal_add_docs(QmlCompilerPrivate +qt_internal_add_docs(QmlCompiler doc/qtqmlcompiler.qdocconf ) diff --git a/src/qmlcompiler/qqmljsloggingutils.h b/src/qmlcompiler/qqmljsloggingutils.h index 0c11e03b87..71af0e2d89 100644 --- a/src/qmlcompiler/qqmljsloggingutils.h +++ b/src/qmlcompiler/qqmljsloggingutils.h @@ -4,8 +4,8 @@ #ifndef QQMLJSLOGGER_H #define QQMLJSLOGGER_H -#include <QtCore/QFileInfo> -#include <qtqmlcompilerexports.h> +#include <QtCore/qanystringview.h> +#include <QtQmlCompiler/qtqmlcompilerexports.h> QT_BEGIN_NAMESPACE @@ -23,7 +23,7 @@ class Q_QMLCOMPILER_EXPORT LoggerWarningId public: constexpr LoggerWarningId(QAnyStringView name) : m_name(name) { } - const QAnyStringView name() const { return m_name; } + QAnyStringView name() const { return m_name; } private: friend bool operator==(const LoggerWarningId &a, const LoggerWarningId &b) diff --git a/src/qmlcompiler/qqmljsloggingutils_p.h b/src/qmlcompiler/qqmljsloggingutils_p.h index 74965950f3..69ff73aa7f 100644 --- a/src/qmlcompiler/qqmljsloggingutils_p.h +++ b/src/qmlcompiler/qqmljsloggingutils_p.h @@ -15,6 +15,7 @@ // We mean it. // +#include <QtCore/qstring.h> #include <private/qtqmlcompilerexports_p.h> #include "qqmljsloggingutils.h" diff --git a/src/qmlcompiler/qqmlsa.h b/src/qmlcompiler/qqmlsa.h index 6e7b37619c..5b09d31358 100644 --- a/src/qmlcompiler/qqmlsa.h +++ b/src/qmlcompiler/qqmlsa.h @@ -13,12 +13,14 @@ // future versions of Qt. // -#include "qqmlsaconstants.h" -#include "qqmljsloggingutils.h" +#include <QtQmlCompiler/qqmlsaconstants.h> +#include <QtQmlCompiler/qqmljsloggingutils.h> -#include <qtqmlcompilerexports.h> +#include <QtQmlCompiler/qtqmlcompilerexports.h> -#include <QtCore/QMultiHash> +#include <QtCore/qhash.h> +#include <QtCore/qsharedpointer.h> +#include <QtCore/qplugin.h> #include <QtQmlCompiler/qqmlsasourcelocation.h> #include <unordered_map> |