forked from qt-creator/qt-creator
QmlDesigner: fix effect_bundle path on macOS
Change-Id: I4ae9583dbea4f83b30a8b47d107edf08187f7d12 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/hostosinfo.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
@@ -116,7 +117,12 @@ void ContentLibraryEffectsModel::loadBundle()
|
|||||||
if (m_bundleExists || m_probeBundleDir)
|
if (m_bundleExists || m_probeBundleDir)
|
||||||
return;
|
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
|
// search for bundleDir from exec dir and up
|
||||||
if (bundleDir.dirName() == ".") {
|
if (bundleDir.dirName() == ".") {
|
||||||
|
Reference in New Issue
Block a user