[KCoreAddons] Port QRegExp to QRegularExpression

Authored by ahmadsamir on Dec 22 2019, 2:05 PM.

Description

[KCoreAddons] Port QRegExp to QRegularExpression

Summary:
Port QRegExp::exactMatch() by using QRegularExpression::anchoredPattern()
to match the entire subject string.

KStringHandler::tagUrls(), make the regex slightly easier to read and capture
the whole matched url to use when calling QString::replace().

Note that KStringHandler::perlSplit(QRegExp... will have to be kept and
marked for deprecation, since it's called by some other apps in KDE.
A new perlSplit() overload should be added, possibly, just one perlSplit()
function that takes a QString, and a param indicating whether to treat it
as plain text or a regular expression.

Test Plan: make && ctest

Reviewers: Frameworks, mpyne, dfaure, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: Frameworks

Maniphest Tasks: T12279

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

Details

Committed
ahmadsamirDec 26 2019, 5:43 AM
Reviewer
apol
Differential Revision
D26210: [KCoreAddons] Port QRegExp to QRegularExpression
Parents
R244:ba70419bc644: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown