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

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