ClangToolsUtils: Reuse ClangToolType enum

Change-Id: Iee95a014d634a99c6e10582f8e942a12ebf1bd74
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-10 16:36:59 +01:00
parent 0ba3dbf1be
commit c4882a5a7a
8 changed files with 46 additions and 69 deletions

View File

@@ -36,7 +36,7 @@ SettingsWidget::SettingsWidget()
resize(400, 300);
QString placeHolderText = shippedClangTidyExecutable().toUserOutput();
QString placeHolderText = toolShippedExecutable(ClangToolType::Tidy).toUserOutput();
FilePath path = m_settings->executable(ClangToolType::Tidy);
if (path.isEmpty() && placeHolderText.isEmpty())
path = Constants::CLANG_TIDY_EXECUTABLE_NAME;
@@ -47,7 +47,7 @@ SettingsWidget::SettingsWidget()
m_clangTidyPathChooser->setFilePath(path);
m_clangTidyPathChooser->setHistoryCompleter("ClangTools.ClangTidyExecutable.History");
placeHolderText = shippedClazyStandaloneExecutable().toUserOutput();
placeHolderText = toolShippedExecutable(ClangToolType::Clazy).toUserOutput();
path = m_settings->executable(ClangToolType::Clazy);
if (path.isEmpty() && placeHolderText.isEmpty())
path = Constants::CLAZY_STANDALONE_EXECUTABLE_NAME;