From 32ce7fa8d29cef4c0154c0fd2278a923a38225ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Keller?= Date: Thu, 15 Feb 2024 11:49:50 +0100 Subject: [PATCH] Windeployqt: prevent output for --list option Some outputs weren't guarded with the optVerboseLevel which caused them to occur even with the --list option. Add a guard to prevent for that. Fixes: QTBUG-122257 Pick-to: 6.6 Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5 Reviewed-by: Oliver Wolff (cherry picked from commit ad2da2080c8b99665cd32237ab365fee5461cf66) Reviewed-by: Qt Cherry-pick Bot --- src/tools/windeployqt/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp index 9eab342d338..a5c05b91172 100644 --- a/src/tools/windeployqt/main.cpp +++ b/src/tools/windeployqt/main.cpp @@ -946,11 +946,11 @@ static QString deployPlugin(const QString &plugin, const QDir &subDir, const boo { const QString subDirName = subDir.dirName(); // Filter out disabled plugins - if (pluginSelections.disabledPluginTypes.contains(subDirName)) { + if (optVerboseLevel && pluginSelections.disabledPluginTypes.contains(subDirName)) { std::wcout << "Skipping plugin " << plugin << " due to skipped plugin type " << subDirName << '\n'; return {}; } - if (subDirName == u"generic" && plugin.contains(u"qinsighttracker") + if (optVerboseLevel && subDirName == u"generic" && plugin.contains(u"qinsighttracker") && !deployInsightTrackerPlugin) { std::wcout << "Skipping plugin " << plugin << ". Use -deploy-insighttracker if you want to use it.\n"; @@ -965,7 +965,7 @@ static QString deployPlugin(const QString &plugin, const QDir &subDir, const boo : dotIndex; const QString pluginName = plugin.first(stripIndex); - if (pluginSelections.excludedPlugins.contains(pluginName)) { + if (optVerboseLevel && pluginSelections.excludedPlugins.contains(pluginName)) { std::wcout << "Skipping plugin " << plugin << " due to exclusion option" << '\n'; return {}; } @@ -1059,7 +1059,8 @@ QStringList findQtPlugins(ModuleBitset *usedQtModules, const ModuleBitset &disab ? MatchDebugOrRelease // QTBUG-44331: Debug detection does not work for webengine, deploy all. : debugMatchModeIn; QDir subDir(subDirFi.absoluteFilePath()); - std::wcout << "Adding in plugin type " << subDirFi.baseName() << " for module: " << qtModuleEntries.moduleById(module).name << '\n'; + if (optVerboseLevel) + std::wcout << "Adding in plugin type " << subDirFi.baseName() << " for module: " << qtModuleEntries.moduleById(module).name << '\n'; const bool isPlatformPlugin = subDirName == "platforms"_L1; const QStringList plugins =