summaryrefslogtreecommitdiffstats
path: root/src/tools/windeployqt/main.cpp
diff options
context:
space:
mode:
authorTimothée Keller <timothee.keller@qt.io>2023-11-14 17:34:33 +0100
committerTimothée Keller <timothee.keller@qt.io>2024-01-16 14:53:38 +0100
commitbca41b1832bf1ce76787109456094149520bc403 (patch)
tree666c379d801a5439a6f0772fca68fe93dbd6ad3f /src/tools/windeployqt/main.cpp
parent6e215a44c131598c5f75198a443d796f2709ad89 (diff)
Windeployqt: also allow platform-type plugin selection
Including/excluding plugins of the platforms type did not work, since windeployqt was only ever looking for 'qwindows'. Keep the default behavior of deploying 'qwindows.dll', but also allow users to add/remove platform-type plugins. Pick-to: 6.7 6.6 Change-Id: I4062a71939224d1462896d95a2541e8caced399d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/tools/windeployqt/main.cpp')
-rw-r--r--src/tools/windeployqt/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp
index b90fb94cf3..d60a8ee098 100644
--- a/src/tools/windeployqt/main.cpp
+++ b/src/tools/windeployqt/main.cpp
@@ -962,6 +962,14 @@ static QString deployPlugin(const QString &plugin, const QDir &subDir, const boo
return {};
}
+ // By default, only deploy qwindows.dll
+ if (subDirName == u"platforms"
+ && !(pluginSelections.includedPlugins.contains(pluginName)
+ || (pluginSelections.enabledPluginTypes.contains(subDirName)))
+ && !pluginName.startsWith(u"qwindows")) {
+ return {};
+ }
+
const QString pluginPath = subDir.absoluteFilePath(plugin);
// If dueToModule is false, check if the user included the plugin or the entire type. In the
@@ -1052,25 +1060,17 @@ QStringList findQtPlugins(ModuleBitset *usedQtModules, const ModuleBitset &disab
: debugMatchModeIn;
QDir subDir(subDirFi.absoluteFilePath());
std::wcout << "Adding in plugin type " << subDirFi.baseName() << " for module: " << qtModuleEntries.moduleById(module).name << '\n';
- // Filter for platform or any.
- QString filter;
+
const bool isPlatformPlugin = subDirName == "platforms"_L1;
- if (isPlatformPlugin) {
- filter = QStringLiteral("qwindows");
- if (!infix.isEmpty())
- filter += infix;
- } else {
- filter = u"*"_s;
- }
const QStringList plugins =
- findSharedLibraries(subDir, platform, debugMatchMode, filter);
+ findSharedLibraries(subDir, platform, debugMatchMode, QString());
for (const QString &plugin : plugins) {
const QString pluginPath =
deployPlugin(plugin, subDir, dueToModule, debugMatchMode, usedQtModules,
disabledQtModules, pluginSelections, libraryLocation, infix,
platform, deployInsightTrackerPlugin);
if (!pluginPath.isEmpty()) {
- if (isPlatformPlugin)
+ if (isPlatformPlugin && plugin.startsWith(u"qwindows"))
*platformPlugin = subDir.absoluteFilePath(plugin);
result.append(pluginPath);
}