Add perlSplit() overload taking a QRegularExpression and deprecate the QRegExp one
ClosedPublic

Authored by ahmadsamir on Tue, Jan 14, 11:32 AM.

Details

Summary

This adds a perlSplit() overload that takes a QRegularExpression
parameter, and also deprecates the version that took a QRegExp param.

For both functions, return early if the string to be split is empty.

Test Plan

make && ctest

Diff Detail

Repository
R244 KCoreAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir created this revision.Tue, Jan 14, 11:32 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptTue, Jan 14, 11:32 AM
ahmadsamir requested review of this revision.Tue, Jan 14, 11:32 AM
dfaure accepted this revision.Wed, Jan 15, 11:18 PM

There could be a ton more unittests, but OK, good enough since the old code didn't have more.

This revision is now accepted and ready to land.Wed, Jan 15, 11:18 PM
This revision was automatically updated to reflect the committed changes.

FRT, there's only one usage of perlSplit(QChar...), https://lxr.kde.org/source/kde/kdemultimedia/libkcddb/libkcddb/cdinfo.cpp#0313
nothing else uses any of the perlSplit() functions.