Skip to content
Snippets Groups Projects
Commit 01332cfb authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

escape backslash => make "whole words only" work with "regular expression"

parent 2f1f67f5
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ void runFileSearchRegExp(QFutureInterface<FileSearchResult> &future,
int numFilesSearched = 0;
int numMatches = 0;
if (flags & QTextDocument::FindWholeWords)
searchTerm = QString("\b%1\b").arg(searchTerm);
searchTerm = QString("\\b%1\\b").arg(searchTerm);
Qt::CaseSensitivity caseSensitivity = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive;
QRegExp expression(searchTerm, caseSensitivity);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment