forked from qt-creator/qt-creator
Clangd: Fix version check to use (remote) executable
Fixes: QTCREATORBUG-30374 Change-Id: I4a98a82ea24bb55a2ab3eed72f13d3d6f648df8a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -207,11 +207,11 @@ static BaseClientInterface *clientInterface(Project *project, const Utils::FileP
|
||||
"--clang-tidy=0"}};
|
||||
if (settings.workerThreadLimit() != 0)
|
||||
cmd.addArg("-j=" + QString::number(settings.workerThreadLimit()));
|
||||
if (indexingEnabled && settings.clangdVersion() >= QVersionNumber(15)) {
|
||||
if (indexingEnabled && Utils::clangdVersion(clangdExePath) >= QVersionNumber(15)) {
|
||||
cmd.addArg("--background-index-priority="
|
||||
+ ClangdSettings::priorityToString(indexingPriority));
|
||||
}
|
||||
if (settings.clangdVersion() >= QVersionNumber(16))
|
||||
if (Utils::clangdVersion(clangdExePath) >= QVersionNumber(16))
|
||||
cmd.addArg("--rename-file-limit=0");
|
||||
if (!jsonDbDir.isEmpty())
|
||||
cmd.addArg("--compile-commands-dir=" + clangdExePath.withNewMappedPath(jsonDbDir).path());
|
||||
|
||||
Reference in New Issue
Block a user