macdeployqt: Adapt upstream change

This commit is contained in:
Jonas Kvinge 2021-08-19 19:13:43 +02:00
parent 50ab01d9c9
commit 46d927291c
1 changed files with 4 additions and 6 deletions

View File

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