From 679b46861829649b08171fb625ef69b77b44d0fb Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 19 Aug 2021 20:27:21 +0200 Subject: [PATCH] macdeployqt: Fix QLibraryInfo::LibraryExecutablesPath with Qt 5 --- 3rdparty/macdeployqt/shared.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/3rdparty/macdeployqt/shared.cpp b/3rdparty/macdeployqt/shared.cpp index 77c71fec3..074864535 100644 --- a/3rdparty/macdeployqt/shared.cpp +++ b/3rdparty/macdeployqt/shared.cpp @@ -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())