From 24fe86ebe77e2cc6e93487a3c78bc5c22544ee79 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 14 Apr 2023 15:23:05 +0200 Subject: [PATCH] CMake: Store unsanitized plugin type names in module .json files The module information .json gained a "plugin_types" key in 6.5.0. Unfortunately, this contained the "sanitized" version of plugin types, meaning dashes converted to underscores. For plugin types that contain dashes, e.g. wayland-decoration-client, the file contained wayland_decoration_client, which doesn't match its plugin directory name. Since "unsanitizing" plugin names is hard and "sanitizing" is easy, we now store the unsanitized plugin names and burden the consumer of the module .json files with the sanitation task. [ChangeLog][CMake] The module information JSON files now contain the unsanitized plugin types of a module, e.g. wayland-decoration-client instead of wayland_decoration_client. Consumers of the module information file must sanitize plugin types themselves if necessary. Pick-to: 6.5 Fixes: QTBUG-112872 Change-Id: I09cc9406b360779087086707abee3d5219a24452 Reviewed-by: Alexandru Croitor --- cmake/QtModuleHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index ec5a4ae4f87..f6299d089c1 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -1076,7 +1076,7 @@ function(qt_describe_module target) get_target_property(target_type ${target} TYPE) if(NOT target_type STREQUAL "INTERFACE_LIBRARY") - get_target_property(plugin_types ${target} MODULE_PLUGIN_TYPES) + get_target_property(plugin_types ${target} QMAKE_MODULE_PLUGIN_TYPES) if(plugin_types) qt_internal_list_to_json_array(plugin_types plugin_types) string(APPEND extra_module_information "\n \"plugin_types\": ${plugin_types},")