CMake: Fix output of internal QML types

We only need one line for those. For now we cannot add the version
information because that was forgotten when the qmldir parser was
written.

Pick-to: 6.5
Fixes: QTBUG-110815
Change-Id: Ic922caa6a339a51b905b493e4638ee4d8f737fe6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ulf Hermann 2023-02-03 11:30:20 +01:00
parent 577e1dea25
commit d15efae7e1
1 changed files with 5 additions and 0 deletions

View File

@ -2154,11 +2154,16 @@ function(qt6_target_qml_sources target)
foreach(qml_file_version IN LISTS qml_file_versions)
if (qml_file_singleton)
string(APPEND qmldir_file_contents "singleton ")
elseif (qml_file_internal)
continue()
endif()
string(APPEND qmldir_file_contents "${qml_file_typename} ${qml_file_version} ${file_resource_path}\n")
endforeach()
if (qml_file_internal)
# TODO: Remove when all qmldir parsers can parse internal types with versions.
# Instead handle internal types like singletons above.
# See QTCREATORBUG-28755
string(APPEND qmldir_file_contents "internal ${qml_file_typename} ${file_resource_path}\n")
endif()