From 32df59bea18bebc18d6d308750e88be325522d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Thu, 10 Aug 2023 14:15:34 +0200 Subject: [PATCH 2/3] Check in the QML folder of this library does actually exist In a modularized installation, this folder will be the location where `qtbase` itself is installed, but `qtbase` does not have any QML code, and `qmlimportscanner` will complain that it does not exist. --- src/tools/macdeployqt/shared/shared.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp index b8fcc9c9bd..676d34d545 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp @@ -1290,9 +1290,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf } for (const QString &importPath : qmlImportPaths) argumentList << "-importPath" << importPath; + QString qmlImportsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath); - argumentList.append( "-importPath"); - argumentList.append(qmlImportsPath); + if (QFile::exists(qmlImportsPath)) { + argumentList.append( "-importPath"); + argumentList.append(qmlImportsPath); + } // run qmlimportscanner QProcess qmlImportScanner; -- 2.26.2