ui: store and display translation unit of recorded indexing errors

This commit is contained in:
mlangkabel
2018-07-02 13:00:41 +02:00
parent 6794b61fab
commit 7c09f3339b
17 changed files with 77 additions and 49 deletions
+4 -4
View File
@@ -91,11 +91,11 @@ void ParserClientImpl::recordComment(const ParseLocation& location)
}
void ParserClientImpl::doRecordError(
const ParseLocation& location, const std::wstring& message, bool fatal, bool indexed)
const ParseLocation& location, const std::wstring& message, bool fatal, bool indexed, const FilePath& translationUnit)
{
if (location.isValid())
{
addError(message, fatal, indexed, location);
addError(message, fatal, indexed, location, translationUnit);
}
}
@@ -331,7 +331,7 @@ void ParserClientImpl::addCommentLocation(const ParseLocation& location)
}
void ParserClientImpl::addError(
const std::wstring& message, bool fatal, bool indexed, const ParseLocation& location)
const std::wstring& message, bool fatal, bool indexed, const ParseLocation& location, const FilePath& translationUnit)
{
if (!m_storage)
{
@@ -339,6 +339,6 @@ void ParserClientImpl::addError(
}
m_storage->addError(StorageErrorData(
message, location.filePath.wstr(), location.startLineNumber, location.startColumnNumber, fatal, indexed
message, location.filePath.wstr(), location.startLineNumber, location.startColumnNumber, translationUnit.wstr(), fatal, indexed
));
}