ClangTools: Reuse TaskTree

Reuse it in ClangToolRunControl and DocumentClangToolRunner.
Get rid of ClangToolRunner and provide clangToolTask() method
instead.

Change-Id: I677940b325850849c5f5a60f2d320c031a4f0da0
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-11 23:48:53 +01:00
parent 1dad90ea45
commit e7781e2a99
8 changed files with 204 additions and 339 deletions

View File

@@ -7,6 +7,7 @@
#include "clangtoolsconstants.h"
#include "clangtoolsdiagnostic.h"
#include "clangtoolssettings.h"
#include "clangtoolstr.h"
#include <coreplugin/icore.h>
#include <cppeditor/cppeditorconstants.h>
@@ -200,6 +201,11 @@ FilePath toolFallbackExecutable(ClangToolType tool)
return findValidExecutable({toolShippedExecutable(tool), fallback});
}
QString clangToolName(CppEditor::ClangToolType tool)
{
return tool == ClangToolType::Tidy ? Tr::tr("Clang-Tidy") : Tr::tr("Clazy");
}
bool isVFSOverlaySupported(const FilePath &executable)
{
static QMap<FilePath, bool> vfsCapabilities;