return;
}
+ bool qtQuickContolsInUse = false; // condition for QtQuick.PrivateWidgets below
+
// deploy each import
foreach (const QJsonValue &importValue, doc.array()) {
if (!importValue.isObject())
QString path = import["path"].toString();
QString type = import["type"].toString();
+ if (import["name"] == "QtQuick.Controls")
+ qtQuickContolsInUse = true;
+
LogNormal() << "Deploying QML import" << name;
// Skip imports with missing info - path will be empty if the import is not found.
deployQmlImport(appBundlePath, deploymentInfo.rpathsUsed, path, name);
LogNormal() << "";
}
+
+ // Special case:
+ // Use of QtQuick.PrivateWidgets is not discoverable at deploy-time.
+ // Recreate the run-time logic here as best as we can - deploy it iff
+ // 1) QtWidgets.framework is used
+ // 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.deployedFrameworks.contains("QtWidgets.framework") && qtQuickContolsInUse) {
+ LogNormal() << "Deploying QML import QtQuick.PrivateWidgets";
+ QString name = "QtQuick/PrivateWidgets";
+ QString path = qmlImportsPath + QLatin1Char('/') + name;
+ deployQmlImport(appBundlePath, deploymentInfo.rpathsUsed, path, name);
+ LogNormal() << "";
+ }
}
void changeQtFrameworks(const QList<FrameworkInfo> frameworks, const QStringList &binaryPaths, const QString &absoluteQtPath)