Port QRegExp to QRegularExpression

Authored by ahmadsamir on Jan 10 2020, 5:43 PM.

Description

Port QRegExp to QRegularExpression

Summary:
QSortFilterProxyModel::setFilterFixedString() internally uses QRegExp
with QRegExp::FixedString syntax option; setFilterFixedString() was
ported by using setFilterRegularExpression(QRegularExpression::escape(string)),
this isn't perfect since QRegularExpression::escape() follows Perl quotemeta
algorithm, basically it escapes all characters in the pattern except for [A-Z],
[a-z], [0-9] and _; so for example a space ' ' is escaped too. See QRegularExpression
docs for the details.

Replace QSortFilterProxyModel::filterRegExp() with filterRegularExpression(),
the same for the relevant setters. Raise min. required Qt version to 5.12,
as that is where filterRegularExpression() was introduced.

Test Plan: make && ctest; some unit tests fail but they fail on master too.

Reviewers: ervin

Reviewed By: ervin

Differential Revision: https://phabricator.kde.org/D26567

Details

Committed
ahmadsamirJan 20 2020, 1:49 PM
Reviewer
ervin
Differential Revision
D26567: Port QRegExp to QRegularExpression
Parents
R4:cb1e5e369fcf: Port KRecursiveFilterProxyModel to QSortFilterProxyModel
Branches
Unknown
Tags
Unknown