ProjectExplorer: Be transparent about what the "Force UTF-8" option does

... in the environment kit aspect.
There is no reason to hide that from the user.

Change-Id: Ia7e3bdccededb538a8615772d9096eb41e8d38b5
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2024-11-18 17:14:42 +01:00
parent 19d200a348
commit 2b5dc3d606

View File

@@ -229,7 +229,7 @@ private:
void refresh() override
{
const EnvironmentItems changes = envWithoutMSVCEnglishEnforcement();
const EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(kit());
const QString shortSummary = EnvironmentItem::toStringList(changes).join("; ");
m_summaryLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.") : shortSummary);
}
@@ -240,10 +240,8 @@ private:
EnvironmentDialog::Polisher polisher = [expander](QWidget *w) {
VariableChooser::addSupportForChildWidgets(w, expander);
};
auto changes = EnvironmentDialog::getEnvironmentItems(m_summaryLabel,
envWithoutMSVCEnglishEnforcement(),
QString(),
polisher);
auto changes = EnvironmentDialog::getEnvironmentItems(
m_summaryLabel, EnvironmentKitAspect::environmentChanges(kit()), QString(), polisher);
if (!changes)
return;
@@ -258,16 +256,6 @@ private:
EnvironmentKitAspect::setEnvironmentChanges(kit(), *changes);
}
EnvironmentItems envWithoutMSVCEnglishEnforcement() const
{
EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(kit());
if (HostOsInfo::isWindowsHost())
changes.removeAll(forceMSVCEnglishItem());
return changes;
}
void initMSVCOutputSwitch(QVBoxLayout *layout)
{
m_vslangCheckbox = new QCheckBox(Tr::tr("Force UTF-8 MSVC compiler output"));