Consider qml dependencies from qrc files in static builds

qmlimportscanner already has support for qrc files, however the rule in
qt.prf did not pass the required arguments to it so far. In combination
with the declarative registration of types, this broke static linking.

Fixes: QTBUG-82873
Change-Id: I4462645e0b353265f9953807dee73f94923dab9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Fabian Kosmale 2020-03-16 15:11:44 +01:00
parent 2329580411
commit fd72ed794d

View File

@ -279,7 +279,15 @@ contains(all_qt_module_deps, qml): \
for (QMLPATH, QMLPATHS): \
IMPORTPATHS += -importPath $$system_quote($$QMLPATH)
#message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
# add qrc files, too
!isEmpty(RESOURCES) {
IMPORTPATHS += -qrcFiles
for (RESOURCE, RESOURCES): \
IMPORTPATHS += $$absolute_path($$system_quote($$RESOURCE), $$_PRO_FILE_PWD_)
}
# message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$_PRO_FILE_PWD_) $$IMPORTPATHS)
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")