D26099: Port QRegExp to QRegularExpression
David Faure
noreply at phabricator.kde.org
Sun Jan 5 10:24:17 GMT 2020
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> timelinetools.cpp:122
> + } else if (sections.count() > 1) {
> + match = s_dateRegexp.match(sections[sections.count() - 2]);
> + if (match.hasMatch()) {
By moving this outside the `else if` above, we no longer go to the "else" branch on line 129 if the matching fails.
@bruns I think this is actually a good use case for assigning inside an `if ()` expression, as we already did in a number of other port-to-QRegularExpression commits.
The alternative is helper functions or lambdas.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D26099
To: ahmadsamir, #baloo, meven, bruns, astippich, mlaurent, apol, dfaure
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200105/98491da1/attachment.html>
More information about the Kde-frameworks-devel
mailing list