From d6d80ff2e925c5c52de498535cfdb808b3bd3670 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 21 Feb 2019 16:43:58 +0100 Subject: Automatic resources: Fix tooling support The files to be put into an auto-generated qrc file must not simply disappear, because IDE users still need to have them in the project tree. So we add them to OTHER_FILES now. Task-number: QTCREATORBUG-20103 Task-number: QTCREATORBUG-20104 Change-Id: I8a9136491f975def7c33385e375c407815ad269a Reviewed-by: hjk Reviewed-by: Joerg Bornemann --- mkspecs/features/resources.prf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index bb2a55b93d..b4e0db6445 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -28,6 +28,7 @@ for(resource, RESOURCES) { !exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \ warning("Failure to find: $$resource") qmake_immediate.files += $$resource + OTHER_FILES *= $$resource } RESOURCES -= $$resource next() @@ -57,6 +58,7 @@ for(resource, RESOURCES) { alias = $$relative_path($$file, $$abs_base) resource_file_content += \ "$$xml_escape($$file)" + OTHER_FILES *= $$file } } -- cgit v1.2.3 From d2dff76a4fc2c28bf204db183230ffa1b86cbf43 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 18 Mar 2019 09:51:35 +0100 Subject: Replace instances of - with _ when generating the function name As - cannot be used in a function name but can still be used as part of the TARGET, then we need to make sure that it is replaced to avoid a compile problem. Change-Id: I0b2e465310206e2522ce59235b1592517817d3e2 Reviewed-by: Joerg Bornemann --- mkspecs/features/resources.prf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index b4e0db6445..fa8ff1fb58 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -75,9 +75,11 @@ for(resource, RESOURCES) { } !isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static { - resource_init_function = $$lower($$basename(TARGET))_plugin_resource_init + pluginBaseName = $$basename(TARGET) + pluginName = $$lower($$replace(pluginBaseName, [-], _)) + resource_init_function = $${pluginName}_plugin_resource_init DEFINES += "QT_PLUGIN_RESOURCE_INIT_FUNCTION=$$resource_init_function" - RESOURCE_INIT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_resources.cpp + RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp GENERATED_SOURCES += $$RESOURCE_INIT_CPP QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP -- cgit v1.2.3