From 41024753eace4aa46fa56222b071d88b2a9c9817 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 27 Jul 2023 15:43:09 +0200 Subject: [PATCH] QmlDesigner: fix effect_bundle path on macOS Change-Id: I4ae9583dbea4f83b30a8b47d107edf08187f7d12 Reviewed-by: Tim Jenssen Reviewed-by: Qt CI Patch Build Bot --- .../contentlibrary/contentlibraryeffectsmodel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryeffectsmodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryeffectsmodel.cpp index 3bfd374bd81..370713c7a50 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryeffectsmodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryeffectsmodel.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -116,7 +117,12 @@ void ContentLibraryEffectsModel::loadBundle() if (m_bundleExists || m_probeBundleDir) return; - QDir bundleDir = qEnvironmentVariable("EFFECT_BUNDLE_PATH"); + QDir bundleDir; + + if (!qEnvironmentVariable("EFFECT_BUNDLE_PATH").isEmpty()) + bundleDir.setPath(qEnvironmentVariable("EFFECT_BUNDLE_PATH")); + else if (Utils::HostOsInfo::isMacHost()) + bundleDir.setPath(QCoreApplication::applicationDirPath() + "/../Resources/effect_bundle"); // search for bundleDir from exec dir and up if (bundleDir.dirName() == ".") {