diff --git a/shared/shared.cpp b/shared/shared.cpp index 316ba5a..2291d71 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -810,6 +810,7 @@ DeploymentInfo deployQtLibraries(QList libraries, LogNormal() << "Deploying the following libraries:" << binaryPaths; QStringList copiedLibraries; DeploymentInfo deploymentInfo; + deploymentInfo.requiresQtWidgetsLibrary = false; deploymentInfo.useLoaderPath = useLoaderPath; deploymentInfo.pluginPath = qtToBeBundledInfo.value("QT_INSTALL_PLUGINS"); QSet rpathsUsed; @@ -822,6 +823,10 @@ DeploymentInfo deployQtLibraries(QList libraries, LogNormal() << "Setting deploymentInfo.qtPath to:" << library.libraryDirectory; deploymentInfo.qtPath = library.libraryDirectory; } + + if(library.libraryName.contains("libQt") and library.libraryName.contains("Widgets.so")) { + deploymentInfo.requiresQtWidgetsLibrary = true; + } if (library.libraryDirectory.startsWith(bundlePath)) { LogNormal() << library.libraryName << "already deployed, skipping."; @@ -1381,7 +1386,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, // 2) QtQuick.Controls is used // The intended failure mode is that libwidgetsplugin.dylib will be present // in the app bundle but not used at run-time. - if (deploymentInfo.deployedLibraries.contains("QtWidgets") && qtQuickContolsInUse) { + if (deploymentInfo.requiresQtWidgetsLibrary && qtQuickContolsInUse) { LogNormal() << "Deploying QML import QtQuick/PrivateWidgets"; QString name = "QtQuick/PrivateWidgets"; QString path = qtToBeBundledInfo.value("QT_INSTALL_QML") + QLatin1Char('/') + name; diff --git a/shared/shared.h b/shared/shared.h index ff00ef9..273b837 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -99,6 +99,7 @@ public: QSet rpathsUsed; bool useLoaderPath; bool isLibrary; + bool requiresQtWidgetsLibrary; }; inline QDebug operator<<(QDebug debug, const AppDirInfo &info);