From 457ab46936f4c90099a0f1b16abaff5312037fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 14 Jan 2020 16:52:54 +0100 Subject: [PATCH] Handle resources with dots in the qrc file name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were removing the .qrc suffix of resources in a way that assumed the filenames would not have any dots in them, but this is not always the case, and we would end up resolving an empty resource name for file names such as .rcc-bar.qrc (e.g. as produced by the qmlcache system). We now remove the .qrc extension explicitly. Change-Id: I50e1d88ac71ca1335bb05f3dbbb2d9bb441a8d64 Fixes: QTBUG-81255 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/resources.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index cee0981db0..6d9f27b86b 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -30,7 +30,7 @@ qtFlattenResources() "{" \ for (resource, RESOURCES) { - resource_name = $$section($$list($$basename(resource)), ., 0, 0) + resource_name = $$replace($$list($$basename(resource)),\.qrc$, ) resource_name = $$replace(resource_name, [^a-zA-Z0-9_], _) RESOURCE_INIT_CONT += " Q_INIT_RESOURCE($$resource_name);" }