Commit 3c78cd08 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

avoid string re-allocations if possible

parent b255405b
......@@ -75,12 +75,12 @@ void SearchDiskFiles::run()
QVector<KateSearchMatch> SearchDiskFiles::searchSingleLineRegExp(QFile &file)
{
QTextStream stream(&file);
QString line;
int i = 0;
int column;
QRegularExpressionMatch match;
QVector<KateSearchMatch> matches;
while (!(line = stream.readLine()).isNull()) {
QString line;
while (stream.readLineInto(&line)) {
if (m_worklist.isCanceled()) {
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment