D26211: Port QRegExp to QRegularExpression
This revision was automatically updated to reflect the committed changes. Closed by commit R246:633a9f22340b: Port QRegExp to QRegularExpression (authored by ahmadsamir). REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26211?vs=76705&id=76724 REVISION DETAIL https://phabricator.kde.org/D26211 AFFECTED FILES data/parsetrigrams.cpp To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
cullmann accepted this revision. cullmann added a comment. This revision is now accepted and ready to land. Thanks, guess that should go in now. REPOSITORY R246 Sonnet BRANCH l-qregularexpression (branched from master) REVISION DETAIL https://phabricator.kde.org/D26211 To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
ahmadsamir updated this revision to Diff 76705. ahmadsamir added a comment. - Move the QRegularExpression definition out of the for loop, more efficient as it'll reused - match() always allocates a QRegularExpressionMatch anyway, so move it inside the while loop - Make the first () non-capturing since the capture group isn't needed REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26211?vs=72149&id=76705 BRANCH l-qregularexpression (branched from master) REVISION DETAIL https://phabricator.kde.org/D26211 AFFECTED FILES data/parsetrigrams.cpp To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
cullmann requested changes to this revision. cullmann added a comment. This revision now requires changes to proceed. Actually, one can re-use this regex for all files by moving it before the scope of the loop, or? The match on the other side is allocated per match() call, I would just move that inside the inner stuff and just do some const auto match = rx REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D26211 To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
ahmadsamir updated this revision to Diff 72149. ahmadsamir added a comment. Use capturedRef(), cheaper REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26211?vs=72148&id=72149 BRANCH l-qregularexpression (branched from master) REVISION DETAIL https://phabricator.kde.org/D26211 AFFECTED FILES data/parsetrigrams.cpp To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
apol added a comment. Looks good otherwise INLINE COMMENTS > parsetrigrams.cpp:59 > +if (match.hasMatch()) { > +models[fname][line.left(3)] = match.captured(2).toInt(); > } capturedRef REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D26211 To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26211: Port QRegExp to QRegularExpression
ahmadsamir created this revision. ahmadsamir added reviewers: cullmann, apol. Herald added a project: Frameworks. ahmadsamir requested review of this revision. TEST PLAN make && ctest REPOSITORY R246 Sonnet BRANCH l-qregularexpression (branched from master) REVISION DETAIL https://phabricator.kde.org/D26211 AFFECTED FILES data/parsetrigrams.cpp To: ahmadsamir, cullmann, apol Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns