aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlMacros.cmake
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-15 18:28:47 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-16 10:58:52 +0100
commit40eff49251a0da87c7e7cb2959a353338d089d1e (patch)
tree7df47aca1879463a10541ceaa3b3172604a18641 /src/qml/Qt6QmlMacros.cmake
parent520a31f5f69d9598228ea901364e30c5695e91f2 (diff)
Do generate typeinfo qmldir entries for pure QML modules
As we generated qmltypes files (albeit empty), we also have to advertise them in the qmldir files. Otherwise qmllint will complain, as that is a common mistake in old modules where qmldir files were written manually. Change-Id: I4c96610930d89558cd363b7f9db28ec6e21ed4d5 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlMacros.cmake')
-rw-r--r--src/qml/Qt6QmlMacros.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index 89afeb1d69..e8a440c5b5 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -311,15 +311,13 @@ function(qt6_add_qml_module target)
endif()
if (arg_TYPEINFO)
string(APPEND qmldir_file_contents "typeinfo ${arg_TYPEINFO}\n")
- elseif (arg_SOURCES)
+ else()
# This always need to be written out since at the moment we have cases
# where qmltyperegistrar is not run with the plugin but on a module
# e.g: src/qml generates the qmltypes for src/imports/qtqml.
# When this has been fixed/standardized we should move this to
# qt6_qml_type_registration() so that it is written out when the
# plugins.qmltypes is actually generated.
- # However, if there are no sources, then this is a pure QML module. In
- # that case there cannot be a plugins.qmltypes file.
string(APPEND qmldir_file_contents "typeinfo plugins.qmltypes\n")
endif()