diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2022-06-10 09:41:27 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2022-06-29 17:00:12 +0200 |
commit | 9a8948f9d185050bfcc507be8422cc40b2a1db9d (patch) | |
tree | 71f5c1646c4c25d35990bb9ffba0cb6c10497b8f /src/qml/CMakeLists.txt | |
parent | 7bdfbb041a8f908c746fb8f6ac6bb5e0ef2c2f64 (diff) |
qmltc: Use correct output C++ file names within a module
Due to custom basenames in CMake qmltc can create non-default file names
that contain the generated C++. This would cause troubles when locally
importing such a custom-marked QML file from the same module. Resolve
this by introducing a qrc-based mapping from source file name to C++
header file that the generated code would be put into
Use the mapping information inside QmltcVisitor so that imported types
are properly set
Doing so, with some additional fixes around file paths collection,
allows to get rid of the prototype code completely
Fixes: QTBUG-104094
Pick-to: 6.4
Change-Id: I6a54774addf303449f35915df501ab3f47470c44
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/CMakeLists.txt')
-rw-r--r-- | src/qml/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index cefb82f2d8..d2b0bb4ac3 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -405,6 +405,7 @@ qt_internal_add_qml_module(Qml "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmlFindQmlscInternal.cmake" "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmlDeploySupport.cmake" "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmlModuleDirMappingTemplate.qrc.in" + "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmltcFileMappingTemplate.qrc.in" ${extra_cmake_files} EXTRA_CMAKE_INCLUDES "${INSTALL_CMAKE_NAMESPACE}QmlFindQmlscInternal.cmake" |