From fd72ed794d0325e122cd42cf3c2d0e4874b7b929 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 16 Mar 2020 15:11:44 +0100 Subject: 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 Reviewed-by: Andy Shaw --- mkspecs/features/qt.prf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 3a71376029..fc46bcb74b 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -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.") -- cgit v1.2.3