forked from qt-creator/qt-creator
GitGrep: fixed substitution of regexp
Task-number: QTCREATORBUG-17193 Change-Id: I7e11a5a55f373dce98a9e203bb3bcb5e929174fc Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user