forked from qt-creator/qt-creator
SilverSearcher: Limit the number of calls to nextLine()
It's a preparation step for the incremental parsing. Change-Id: I98268abd6d3e0210f218663a6c2bb701c3bfc070 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -112,8 +112,10 @@ SearchResultItems parse(const QString &output, const std::optional<QRegularExpre
|
||||
|
||||
const FilePath filePath = FilePath::fromPathPart(filePathLine.mid(1));
|
||||
|
||||
QStringView hitLine = nextLine(&remainingOutput);
|
||||
while (!hitLine.isEmpty()) {
|
||||
while (true) {
|
||||
QStringView hitLine = nextLine(&remainingOutput);
|
||||
if (hitLine.isEmpty())
|
||||
break;
|
||||
int lineNumber = -1;
|
||||
if (!parseLineNumber(&hitLine, &lineNumber))
|
||||
break;
|
||||
@@ -133,7 +135,6 @@ SearchResultItems parse(const QString &output, const std::optional<QRegularExpre
|
||||
: QVariant());
|
||||
items.append(item);
|
||||
}
|
||||
hitLine = nextLine(&remainingOutput);
|
||||
}
|
||||
}
|
||||
return items;
|
||||
|
||||
Reference in New Issue
Block a user