forked from qt-creator/qt-creator
ClangCodeModel: prevent text mark annotations in non project files
Since non project files get opened in project specific clients now, the check whether we should add annotations needs to make sure that the marks file is part of the client project. Change-Id: I2790d0f7feb39162686efd06bb3542684d289b95 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1315,10 +1315,10 @@ ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir)
|
||||
setDocumentChangeUpdateThreshold(d->settings.documentUpdateThreshold);
|
||||
|
||||
const auto textMarkCreator = [this](const Utils::FilePath &filePath,
|
||||
const Diagnostic &diag) {
|
||||
const Diagnostic &diag, bool isProjectFile) {
|
||||
if (d->isTesting)
|
||||
emit textMarkCreated(filePath);
|
||||
return new ClangdTextMark(filePath, diag, this);
|
||||
return new ClangdTextMark(filePath, diag, isProjectFile, this);
|
||||
};
|
||||
const auto hideDiagsHandler = []{ ClangDiagnosticManager::clearTaskHubIssues(); };
|
||||
setDiagnosticsHandlers(textMarkCreator, hideDiagsHandler);
|
||||
|
||||
Reference in New Issue
Block a user