VCS: Abstract multi-choice settings in editor config

Change-Id: Iafc089f5ad3796348ab9521b71b31cb645238292
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2019-11-23 22:57:03 +02:00
committed by Orgad Shaneh
parent 9c96a1c4de
commit f2cd459ec5
4 changed files with 25 additions and 20 deletions

View File

@@ -91,12 +91,13 @@ public:
tr("Show merged revisions.")),
settings.boolPointer(BazaarSettings::logIncludeMergesKey));
QList<ComboBoxItem> logChoices;
logChoices << ComboBoxItem(tr("Detailed"), QLatin1String("long"))
<< ComboBoxItem(tr("Moderately Short"), QLatin1String("short"))
<< ComboBoxItem(tr("One Line"), QLatin1String("line"))
<< ComboBoxItem(tr("GNU Change Log"), QLatin1String("gnu-changelog"));
mapSetting(addComboBox(QStringList(QLatin1String("--log-format=%1")), logChoices),
const QList<ChoiceItem> logChoices = {
ChoiceItem(tr("Detailed"), QLatin1String("long")),
ChoiceItem(tr("Moderately Short"), QLatin1String("short")),
ChoiceItem(tr("One Line"), QLatin1String("line")),
ChoiceItem(tr("GNU Change Log"), QLatin1String("gnu-changelog"))
};
mapSetting(addChoices(tr("Format"), { "--log-format=%1" }, logChoices),
settings.stringPointer(BazaarSettings::logFormatKey));
}
};