summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Keller <[email protected]>2024-02-27 10:57:41 +0100
committerFriedemann Kleint <[email protected]>2024-08-14 07:26:20 +0200
commit7c218d20aedd8aaf2c0f2b6954ac400902ae040b (patch)
tree5edfb7bb559b12562aeeb0186ca0061c15927d0e
parent161015d29f9af500d9c3899f9a6aea26f9ca1827 (diff)
Windeployqt: fix exclusion option for Internal modules
The "Internal" suffix was added to module names, but only in the help text and not in the option's name. Change this by adding the "Internal" suffix to the option name in general, rather than just the help text. Fixes: QTBUG-122774 Pick-to: 6.8 6.7 Change-Id: Iaffcde4768a8bf70ba4b8e52cec4ea6490e20bfc Reviewed-by: Oliver Wolff <[email protected]>
-rw-r--r--src/tools/windeployqt/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp
index 0115fb6023a..2eabc35e245 100644
--- a/src/tools/windeployqt/main.cpp
+++ b/src/tools/windeployqt/main.cpp
@@ -88,13 +88,15 @@ static inline QString webProcessBinary(const char *binaryName, Platform p)
return (p & WindowsBased) ? webProcess + QStringLiteral(".exe") : webProcess;
}
-static QString moduleNameToOptionName(const QString &moduleName)
+static QString moduleNameToOptionName(const QString &moduleName, bool internal)
{
QString result = moduleName
.mid(3) // strip the "Qt6" prefix
.toLower();
if (result == u"help"_s)
result.prepend("qt"_L1);
+ if (internal)
+ result.append("Internal"_L1);
return result;
}
@@ -106,10 +108,8 @@ static QByteArray formatQtModules(const ModuleBitset &mask, bool option = false)
if (!result.isEmpty())
result.append(' ');
result.append(option
- ? moduleNameToOptionName(qtModule.name).toUtf8()
+ ? moduleNameToOptionName(qtModule.name, qtModule.internal).toUtf8()
: qtModule.name.toUtf8());
- if (qtModule.internal)
- result.append("Internal");
}
}
return result;
@@ -527,7 +527,7 @@ static inline int parseArguments(const QStringList &arguments, QCommandLineParse
enabledModuleOptions.reserve(qtModulesCount);
disabledModuleOptions.reserve(qtModulesCount);
for (const QtModule &module : qtModuleEntries) {
- const QString option = moduleNameToOptionName(module.name);
+ const QString option = moduleNameToOptionName(module.name, module.internal);
const QString name = module.name;
if (name == u"InsightTracker") {
parser->addOption(deployInsightTrackerOption);
@@ -769,7 +769,7 @@ static inline QString helpText(const QCommandLineParser &p, const PluginInformat
if (qtModuleEntries.size() == 0)
return result;
const QtModule &firstModule = qtModuleEntries.moduleById(0);
- const QString firstModuleOption = moduleNameToOptionName(firstModule.name);
+ const QString firstModuleOption = moduleNameToOptionName(firstModule.name, firstModule.internal);
const qsizetype moduleStart = result.indexOf("\n --"_L1 + firstModuleOption);
const qsizetype argumentsStart = result.lastIndexOf("\nArguments:"_L1);
if (moduleStart >= argumentsStart)