Fix resource prefix calculation

tools/qml/qml.qrc uses prefix="something", which means that the leading
slash is implied.

Change-Id: Ia856fcef36873442a84b9162f1901cb31ca37b49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Simon Hausmann 2019-08-09 17:41:16 +02:00 committed by Alexandru Croitor
parent 3549f51c98
commit 1720970102

View File

@ -153,6 +153,8 @@ def process_qrc_file(target: str, filepath: str, base_dir: str = '', project_fil
assert(resource.tag == 'qresource') assert(resource.tag == 'qresource')
lang = resource.get('lang', '') lang = resource.get('lang', '')
prefix = resource.get('prefix', '/') prefix = resource.get('prefix', '/')
if not prefix.startswith('/'):
prefix = '/' + prefix
full_resource_name = resource_name + (str(resource_count) if resource_count > 0 else '') full_resource_name = resource_name + (str(resource_count) if resource_count > 0 else '')