diff options
author | Christian Kandeler <[email protected]> | 2020-08-24 10:46:58 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2020-08-24 10:18:30 +0000 |
commit | d65ef60ea24a25e636f5a51b51192abbc883da12 (patch) | |
tree | d8b0c76370a9f3cdcff0ca719cb7f350bafe26c0 /src/plugins/clangtools/executableinfo.cpp | |
parent | 643c9405bdf32f7df6037f8c6de51f2b3bdd098c (diff) |
clang: Fix include/resource dir confusion
The getClangResourceDirAndVersion() function in ClangTools could return
the actual resource dir or the include dir, depending on the input. This
mistake happened because of misleading names spread all around the code.
Now the function returns what it says, and the other names are accurate
as well.
Change-Id: I0a8600857ee7b9fafb16256e0d1ad203ac3273d2
Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/clangtools/executableinfo.cpp')
-rw-r--r-- | src/plugins/clangtools/executableinfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/clangtools/executableinfo.cpp b/src/plugins/clangtools/executableinfo.cpp index 6e7bb1fcd4f..d8ab050c20c 100644 --- a/src/plugins/clangtools/executableinfo.cpp +++ b/src/plugins/clangtools/executableinfo.cpp @@ -203,13 +203,13 @@ static QString queryVersion(const FilePath &clangToolPath) return {}; } -QPair<FilePath, QString> getClangResourceDirAndVersion(const FilePath &clangToolPath) +QPair<FilePath, QString> getClangIncludeDirAndVersion(const FilePath &clangToolPath) { const FilePath dynamicResourceDir = queryResourceDir(clangToolPath); const QString dynamicVersion = queryVersion(clangToolPath); if (dynamicResourceDir.isEmpty() || dynamicVersion.isEmpty()) - return qMakePair(FilePath::fromString(CLANG_RESOURCE_DIR), QString(CLANG_VERSION)); - return qMakePair(dynamicResourceDir, dynamicVersion); + return qMakePair(FilePath::fromString(CLANG_INCLUDE_DIR), QString(CLANG_VERSION)); + return qMakePair(dynamicResourceDir + "/include", dynamicVersion); } } // namespace Internal |