Windeployqt: also add internal modules to module list

Not adding internal modules to the windeployqt module list makes it
give off nonsensical warnings, and can force the deployment of debug
libraries despite a --release tag. Add them in to prevent this, and
shave off the "Private" part of the module name if it exists to maintain
compatibility.

Fixes: QTBUG-114854
Pick-to: 6.6 6.5
Change-Id: I884fdc495f340ad20ba6257587da170d6c1a1415
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Timothée Keller 2023-07-05 11:38:11 +02:00
parent 70fc6b4581
commit 87bfd33082
2 changed files with 4 additions and 2 deletions

View File

@ -107,6 +107,8 @@ static QByteArray formatQtModules(const ModuleBitset &mask, bool option = false)
result.append(option
? moduleNameToOptionName(qtModule.name).toUtf8()
: qtModule.name.toUtf8());
if (qtModule.internal)
result.append("Internal");
}
}
return result;

View File

@ -140,8 +140,8 @@ bool QtModuleInfoStore::populate(const QString &modulesDir, const QString &trans
QtModule module = moduleFromJsonFile(filePath, errorString);
if (!errorString->isEmpty())
return false;
if (module.internal)
continue;
if (module.internal && module.name.endsWith(QStringLiteral("Private")))
module.name.chop(7);
module.id = modules.size();
if (module.id == QtModule::InvalidId) {
*errorString = "Internal Error: too many modules for ModuleBitset to hold."_L1;