ui: Improved user experience of error display

* label errors as errors instead of references in file snippet headers
* show number of fatal errors in file snippet headers as well
* only show the first 10 error snippets open, remaining collapsed
* don't show status message after parsing in red on errors
* don't show stats of parsing when project was only loaded
This commit is contained in:
Eberhard Graether
2016-04-13 12:14:55 +02:00
parent 4eef42d15c
commit fcc39f4a77
21 changed files with 159 additions and 53 deletions
+27 -4
View File
@@ -108,14 +108,37 @@ void QtCodeFileList::setFocusedTokenIds(const std::vector<Id>& focusedTokenIds)
m_focusedTokenIds = focusedTokenIds;
}
const std::vector<std::string>& QtCodeFileList::getErrorMessages() const
std::vector<std::string> QtCodeFileList::getErrorMessages() const
{
return m_errorMessages;
std::vector<std::string> errorMessages;
for (const ErrorInfo& error : m_errorInfos)
{
errorMessages.push_back(error.message);
}
return errorMessages;
}
void QtCodeFileList::setErrorMessages(const std::vector<std::string>& errorMessages)
void QtCodeFileList::setErrorInfos(const std::vector<ErrorInfo>& errorInfos)
{
m_errorMessages = errorMessages;
m_errorInfos = errorInfos;
}
bool QtCodeFileList::hasErrors() const
{
return m_errorInfos.size() > 0;
}
size_t QtCodeFileList::getFatalErrorCountForFile(const FilePath& filePath) const
{
size_t fatalErrorCount = 0;
for (const ErrorInfo& error : m_errorInfos)
{
if (error.filePath == filePath && error.isFatal)
{
fatalErrorCount++;
}
}
return fatalErrorCount;
}
void QtCodeFileList::showActiveTokenIds()