diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp index 3beb3855df7..0219f73d101 100644 --- a/src/libs/utils/filesearch.cpp +++ b/src/libs/utils/filesearch.cpp @@ -207,6 +207,7 @@ const FileSearchResultList FileSearchRegExp::operator()(const QString &filePath, QString line; while (!stream.atEnd()) { + ++lineNr; line = stream.readLine(); const QString resultItemText = clippedText(line, MAX_LINE_SIZE); int lengthOfLine = line.size(); @@ -221,7 +222,6 @@ const FileSearchResultList FileSearchRegExp::operator()(const QString &filePath, if (pos >= lengthOfLine) break; } - ++lineNr; if (future->isPaused()) future->waitForResume(); if (future->isCanceled())