triage: improve handling of daca@home results

This commit is contained in:
Daniel Marjamäki 2018-11-24 21:36:59 +01:00
parent b5e83d03fe
commit d2bd536f1b
1 changed files with 11 additions and 6 deletions

View File

@ -47,15 +47,20 @@ void MainWindow::loadFile()
url = line; url = line;
errorMessage.clear(); errorMessage.clear();
} else if (!url.isEmpty() && QRegExp(".*: (error|warning|style|note):.*").exactMatch(line)) { } else if (!url.isEmpty() && QRegExp(".*: (error|warning|style|note):.*").exactMatch(line)) {
if (!errorMessage.isEmpty()) if (line.indexOf(": note:") > 0)
errorMessage += '\n'; errorMessage += '\n' + line;
errorMessage += line; else if (errorMessage.isEmpty()) {
} else if (!url.isEmpty() && QRegExp("(head|1.8.) .*:[0-9]+:.*\\]").exactMatch(line)) { errorMessage = url + '\n' + line;
} else {
allErrors << errorMessage;
errorMessage = url + '\n' + line;
}
} else if (!url.isEmpty() && QRegExp("^(head|1.[0-9][0-9]) .*:[0-9]+:.*\\]").exactMatch(line)) {
allErrors << (url + '\n' + line); allErrors << (url + '\n' + line);
} }
} }
if (!url.isEmpty() && !errorMessage.isEmpty()) if (!errorMessage.isEmpty())
allErrors << (url + "\n" + errorMessage); allErrors << errorMessage;
if (allErrors.size() > 100) { if (allErrors.size() > 100) {
// remove items in /test/ // remove items in /test/
for (int i = allErrors.size()-1; i >= 0 && allErrors.size() > 100; --i) { for (int i = allErrors.size()-1; i >= 0 && allErrors.size() > 100; --i) {