From 5b1538d1c0b408bb54786336f2e59c208686edb2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 14 Mar 2018 10:20:09 +0100 Subject: Fix use of CONFIG+=qtquickcompiler with spaces in paths Add strategic calls to system_quote and shell_quote and correct the output list iteration to not use $$list, as that will end up splitting on spaces in the path. Task-number: QTBUG-67011 Change-Id: I31dbee537e2052ac7b802ee3509a74c9db3b8beb Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- tools/qmlcachegen/qtquickcompiler.prf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/qmlcachegen') diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf index 75e474ba70..1e87a2d7e7 100644 --- a/tools/qmlcachegen/qtquickcompiler.prf +++ b/tools/qmlcachegen/qtquickcompiler.prf @@ -22,21 +22,21 @@ QMLCACHE_RESOURCE_FILES = for(res, RESOURCES) { absRes = $$absolute_path($$res, $$_PRO_FILE_PWD_) - rccContents = $$system($$QMAKE_RCC_DEP -list $$absRes,lines) + rccContents = $$system($$QMAKE_RCC_DEP -list $$system_quote($$absRes),lines) contains(rccContents,.*\\.js$)|contains(rccContents,.*\\.qml$) { new_resource = $$qmlCacheResourceFileOutputName($$res) mkpath($$dirname(new_resource)) - remaining_files = $$system($$QML_CACHEGEN_FILTER -filter-resource-file -o $$new_resource $$absRes,lines) + remaining_files = $$system($$QML_CACHEGEN_FILTER -filter-resource-file -o $$system_quote($$new_resource) $$system_quote($$absRes),lines) !isEmpty(remaining_files) { NEWRESOURCES += $$new_resource - QMLCACHE_LOADER_FLAGS += --resource-file-mapping=$$absRes=$$new_resource + QMLCACHE_LOADER_FLAGS += --resource-file-mapping=$$shell_quote($$absRes=$$new_resource) } else { - QMLCACHE_LOADER_FLAGS += --resource-file-mapping=$$absRes + QMLCACHE_LOADER_FLAGS += --resource-file-mapping=$$shell_quote($$absRes) } QMLCACHE_RESOURCE_FILES += $$absRes - for(candidate, $$list($$rccContents)) { + for(candidate, rccContents) { contains(candidate,.*\\.js$)|contains(candidate,.*\\.qml$) { QMLCACHE_FILES += $$candidate } @@ -50,7 +50,7 @@ RESOURCES = $$NEWRESOURCES QMLCACHE_RESOURCE_FLAGS = for(res, QMLCACHE_RESOURCE_FILES) { - QMLCACHE_RESOURCE_FLAGS += --resource=$$res + QMLCACHE_RESOURCE_FLAGS += --resource=$$shell_quote($$res) } defineReplace(qmlCacheOutputName) { -- cgit v1.2.3