ClangFormat: Fix terminology

It is either `ClangFormat` (the product) or `clang-format` (the
executable).

Change-Id: I018abd8c6f3d33a7d93259f79ce09174e451a5df
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Eike Ziller
2024-10-07 12:05:15 +02:00
parent 0f1526ed25
commit 6309a3c8d7
5 changed files with 18 additions and 16 deletions

View File

@@ -15239,12 +15239,12 @@ Zum Beispiel bewirkt die Angabe &quot;Revision: 15&quot; dass der Branch auf Rev
<translation>Fallback-Stil:</translation> <translation>Fallback-Stil:</translation>
</message> </message>
<message> <message>
<source>Clang Format command:</source> <source>ClangFormat command:</source>
<translation>Ausführbare Datei von Clang Format:</translation> <translation>Ausführbare Datei von ClangFormat:</translation>
</message> </message>
<message> <message>
<source>Clang Format</source> <source>ClangFormat</source>
<translation>Clang Format</translation> <translation>ClangFormat</translation>
</message> </message>
<message> <message>
<source>Use file uncrustify.cfg defined in project files</source> <source>Use file uncrustify.cfg defined in project files</source>

View File

@@ -15352,12 +15352,12 @@ Par exemple, «&#xa0;Revision&#xa0;: 15&#xa0;» laissera la branche à la révis
<translation>Style de repli :</translation> <translation>Style de repli :</translation>
</message> </message>
<message> <message>
<source>Clang Format command:</source> <source>ClangFormat command:</source>
<translation>Commande de Clang Format :</translation> <translation>Commande de ClangFormat :</translation>
</message> </message>
<message> <message>
<source>Clang Format</source> <source>ClangFormat</source>
<translation>Clang Format</translation> <translation>ClangFormat</translation>
</message> </message>
<message> <message>
<source>No description available.</source> <source>No description available.</source>

View File

@@ -150,7 +150,7 @@ AbstractSettings::AbstractSettings(const QString &name, const QString &ending)
command.setSettingsKey("command"); command.setSettingsKey("command");
command.setExpectedKind(PathChooser::ExistingCommand); command.setExpectedKind(PathChooser::ExistingCommand);
command.setCommandVersionArguments({"--version"}); command.setCommandVersionArguments({"--version"});
command.setPromptDialogTitle(BeautifierTool::msgCommandPromptDialogTitle("Clang Format")); command.setPromptDialogTitle(BeautifierTool::msgCommandPromptDialogTitle("ClangFormat"));
command.setValidatePlaceHolder(true); command.setValidatePlaceHolder(true);
command.addOnChanged(this, [this] { m_version = {}; version(); }); command.addOnChanged(this, [this] { m_version = {}; version(); });

View File

@@ -54,8 +54,8 @@ public:
: AbstractSettings(SETTINGS_NAME, ".clang-format") : AbstractSettings(SETTINGS_NAME, ".clang-format")
{ {
command.setDefaultValue("clang-format"); command.setDefaultValue("clang-format");
command.setPromptDialogTitle(BeautifierTool::msgCommandPromptDialogTitle("Clang Format")); command.setPromptDialogTitle(BeautifierTool::msgCommandPromptDialogTitle("ClangFormat"));
command.setLabelText(Tr::tr("Clang Format command:")); command.setLabelText(Tr::tr("ClangFormat command:"));
usePredefinedStyle.setSettingsKey("usePredefinedStyle"); usePredefinedStyle.setSettingsKey("usePredefinedStyle");
usePredefinedStyle.setDefaultValue(true); usePredefinedStyle.setDefaultValue(true);
@@ -530,7 +530,7 @@ public:
ClangFormatSettingsPage() ClangFormatSettingsPage()
{ {
setId("ClangFormat"); setId("ClangFormat");
setDisplayName(Tr::tr("Clang Format")); setDisplayName(Tr::tr("ClangFormat"));
setCategory(Constants::OPTION_CATEGORY); setCategory(Constants::OPTION_CATEGORY);
setWidgetCreator([] { return new ClangFormatSettingsPageWidget; }); setWidgetCreator([] { return new ClangFormatSettingsPageWidget; });
} }

View File

@@ -375,9 +375,11 @@ public:
private: private:
void slotImportClicked() final void slotImportClicked() final
{ {
const FilePath filePath = const FilePath filePath = FileUtils::getOpenFilePath(
FileUtils::getOpenFilePath(this, Tr::tr("Import Code Format"), {}, this,
Tr::tr("Clang Format (*clang-format*);;All files (*)")); Tr::tr("Import Code Format"),
{},
Tr::tr("ClangFormat (*clang-format*);;All files (*)"));
if (!filePath.isEmpty()) { if (!filePath.isEmpty()) {
QString name = QInputDialog::getText( QString name = QInputDialog::getText(
this, this,
@@ -407,7 +409,7 @@ private:
this, this,
Tr::tr("Export Code Format"), Tr::tr("Export Code Format"),
FileUtils::homePath(), FileUtils::homePath(),
Tr::tr("Clang Format (*clang-format*);;All files (*)")); Tr::tr("ClangFormat (*clang-format*);;All files (*)"));
if (!filePath.isEmpty()) { if (!filePath.isEmpty()) {
FilePath clangFormatFile = filePathToCurrentSettings(currentPreferences); FilePath clangFormatFile = filePathToCurrentSettings(currentPreferences);
clangFormatFile.copyFile(filePath); clangFormatFile.copyFile(filePath);