summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Keller <timothee.keller@qt.io>2024-03-14 15:09:53 +0000
committerOliver Wolff <oliver.wolff@qt.io>2024-03-15 06:10:22 +0000
commitcfcfe7d07b03c0154c01c0c172d8fcc120080edc (patch)
tree4dd8cdcc804bb8829de6948a3baa2e9d3d135204
parentUpdate bundled libpng to version 1.6.43 (diff)
downloadqtbase-cfcfe7d07b03c0154c01c0c172d8fcc120080edc.tar.xz
qtbase-cfcfe7d07b03c0154c01c0c172d8fcc120080edc.zip
Revert "Windeployqt: remove unused library list"
This reverts commit a05abede682db4ab20a7c1d9eb45a487e91d6a78. Reason for revert: Causes QTBUG-123325 Change-Id: I251b67798af3d768db6f2836b52ded558c0c8211 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/tools/windeployqt/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp
index 80b6df5a06..2487971230 100644
--- a/src/tools/windeployqt/main.cpp
+++ b/src/tools/windeployqt/main.cpp
@@ -1184,6 +1184,7 @@ struct DeployResult
bool success = false;
bool isDebug = false;
ModuleBitset directlyUsedQtLibraries;
+ ModuleBitset usedQtLibraries;
ModuleBitset deployedQtLibraries;
};
@@ -1531,8 +1532,17 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString>
}
QString platformPlugin;
+ // Sort apart Qt 5 libraries in the ones that are represented by the
+ // QtModule enumeration (and thus controlled by flags) and others.
QStringList deployedQtLibraries;
- result.deployedQtLibraries = (result.directlyUsedQtLibraries | options.additionalLibraries) & ~options.disabledLibraries;
+ for (int i = 0 ; i < dependentQtLibs.size(); ++i) {
+ const qint64 module = qtModule(dependentQtLibs.at(i), infix);
+ if (module >= 0)
+ result.usedQtLibraries[module] = 1;
+ else
+ deployedQtLibraries.push_back(dependentQtLibs.at(i)); // Not represented by flag.
+ }
+ result.deployedQtLibraries = (result.usedQtLibraries | options.additionalLibraries) & ~options.disabledLibraries;
ModuleBitset disabled = options.disabledLibraries;
if (!usesQml2) {
@@ -1562,6 +1572,7 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString>
if (optVerboseLevel >= 1) {
std::wcout << "Direct dependencies: " << formatQtModules(result.directlyUsedQtLibraries).constData()
+ << "\nAll dependencies : " << formatQtModules(result.usedQtLibraries).constData()
<< "\nTo be deployed : " << formatQtModules(result.deployedQtLibraries).constData() << '\n';
}