Allow using extended regular expressions in the find dialogs

This adds support for searching "this|that" to find either "this" or "that"
or using quantifiers like "{number}". The change applies to the
Find/Replace dialog and the search bar.

See https://en.cppreference.com/w/cpp/regex/ecmascript for details of the
syntax.

This raises the requirement for an external version of QScintilla to v2.11.

See issue #1625
This commit is contained in:
mgrojo
2019-07-26 19:47:02 +02:00
parent cd748d07ab
commit 48a8481b85
2 changed files with 6 additions and 3 deletions

View File

@@ -244,7 +244,8 @@ bool ExtendedScintilla::findText(QString text, bool regexp, bool caseSensitive,
}
return findFirst(text, regexp, caseSensitive, words, wrap, forward,
/* line */ -1, /* index */ -1, /* show */ true, /* posix */ true);
/* line */ -1, /* index */ -1,
/* show */ true, /* posix */ true, /* cxx11 */ true);
}
void ExtendedScintilla::setEnabledFindDialog(bool value)

View File

@@ -54,7 +54,8 @@ bool FindReplaceDialog::findFirst(bool wrap, bool forward)
ui->wholeWordsCheckBox->isChecked(),
forward,
/* show */ true,
/* posix */ true);
/* posix */ true,
/* cxx11 */ true);
else
return m_scintilla->findFirst
(ui->findText->text(),
@@ -66,7 +67,8 @@ bool FindReplaceDialog::findFirst(bool wrap, bool forward)
/* line */ -1,
/* index */ -1,
/* show */ true,
/* posix */ true);
/* posix */ true,
/* cxx11 */ true);
}
bool FindReplaceDialog::findNext()