D26119: Port QRegExp to QRegularExpression
Glen Ditchfield
noreply at phabricator.kde.org
Sat Dec 21 20:39:19 GMT 2019
gjditchfield added inline comments.
INLINE COMMENTS
> compat.cpp:57
> if (versionStart >= 0) {
> - int versionStop = productId.indexOf(QRegExp(QStringLiteral("[ /]")), versionStart + 1);
> + int versionStop = productId.indexOf(QRegularExpression(QStringLiteral("[ /]")), versionStart + 1);
> if (versionStop >= 0) {
If I understand correctly, this creates a QRegularExpression, compiles the pattern, performs the match, then throws the object and compiled pattern away. Should this declare a constant, so construction and pattern compilation only happen once?
REPOSITORY
R172 KCalendar Core
REVISION DETAIL
https://phabricator.kde.org/D26119
To: ahmadsamir, #kde_pim, winterz, vkrause
Cc: gjditchfield, kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20191221/1472a1ed/attachment.html>
More information about the kde-pim
mailing list