Merge remote-tracking branch 'origin/10.0'

Change-Id: I7bd186df0bfae7906e980e9c2c811f8dcf29750d
This commit is contained in:
Eike Ziller
2023-03-02 10:17:58 +01:00
49 changed files with 936 additions and 377 deletions

View File

@@ -364,11 +364,15 @@ static FilePath getClangHeadersPath(const FilePath &clangdFilePath)
const QVersionNumber version = Utils::clangdVersion(clangdFilePath);
QTC_ASSERT(!version.isNull(), return {});
static const QStringList libDirs{"lib", "lib64"};
const QStringList versionStrings{QString::number(version.majorVersion()), version.toString()};
for (const QString &libDir : libDirs) {
const FilePath includePath = clangdFilePath.absolutePath().parentDir().pathAppended(libDir)
.pathAppended("clang").pathAppended(version.toString()).pathAppended("include");
if (includePath.exists())
return includePath;
for (const QString &versionString : versionStrings) {
const FilePath includePath = clangdFilePath.absolutePath().parentDir()
.pathAppended(libDir).pathAppended("clang")
.pathAppended(versionString).pathAppended("include");
if (includePath.exists())
return includePath;
}
}
QTC_CHECK(false);
return {};