macdeployqt: Fix QLibraryInfo::LibraryExecutablesPath with Qt 5

This commit is contained in:
Jonas Kvinge 2021-08-19 20:27:21 +02:00
parent cf2a0af3d9
commit 679b468618
1 changed files with 5 additions and 3 deletions

View File

@ -1427,9 +1427,11 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
LogNormal() << "QML module search path(s) is" << qmlImportPaths;
// Use qmlimportscanner from QLibraryInfo::LibraryExecutablesPath
QString qmlImportScannerPath =
QDir::cleanPath(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
+ "/qmlimportscanner");
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + "/qmlimportscanner");
#else
QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) + "/qmlimportscanner");
#endif
// Fallback: Look relative to the macdeployqt binary
if (!QFile(qmlImportScannerPath).exists())