Commit 028a2c8f authored by con's avatar con
Browse files

File search wasn't showing non-latin1 chars correctly in results.

Missing conversion back to the codec. This fixes it only for Utf8
encoded files. It was only happening for non-regexp searches.

Task-number: QTCREATORBUG-65
Reviewed-by: Robert Loehning
parent 6b6eeb87
......@@ -172,7 +172,7 @@ void runFileSearch(QFutureInterface<FileSearchResultList> &future,
int n = 0;
while (startOfLastLine[i] != '\n' && startOfLastLine[i] != '\r' && i < textLength && n++ < 256)
res.append(startOfLastLine[i++]);
results << FileSearchResult(s, lineNr, QString(res),
results << FileSearchResult(s, lineNr, QString::fromUtf8(res),
regionPtr - startOfLastLine, sa.length(),
QStringList());
++numMatches;
......
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