mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-18 09:49:40 -06:00
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:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user