Commit 39d85833 authored by Przemyslaw Gorszkowski's avatar Przemyslaw Gorszkowski
Browse files

GitGrep: fixed substitution of regexp



Task-number: QTCREATORBUG-17193
Change-Id: I7e11a5a55f373dce98a9e203bb3bcb5e929174fc
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 9b0b6aad
......@@ -112,6 +112,15 @@ public:
+ text.mid(matchEnd + resetColor.size());
}
single.matchingLine = text;
if (m_parameters.flags & FindRegularExpression) {
const QRegularExpression::PatternOptions patternOptions =
(m_parameters.flags & QTextDocument::FindCaseSensitively)
? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption;
QRegularExpression regexp(m_parameters.text, patternOptions);
QRegularExpressionMatch regexpMatch = regexp.match(line);
single.regexpCapturedTexts = regexpMatch.capturedTexts();
}
foreach (auto match, matches) {
single.matchStart = match.first;
single.matchLength = match.second;
......
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