More porting from QRegExp to QRegularExpression

Authored by dhaumann on Aug 23 2019, 6:51 PM.



Less deprecated QRegExp usage.

Test Plan
  • KTextEditor::Commands tested, still work
  • make test is still green

Diff Detail

R39 KTextEditor
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
dhaumann created this revision.Aug 23 2019, 6:51 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptAug 23 2019, 6:51 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
dhaumann requested review of this revision.Aug 23 2019, 6:51 PM
cullmann requested changes to this revision.Aug 23 2019, 7:19 PM

I would tend to make more stuff "static const QRegularExpression", given QRegularExpression unlike QRegExp has not the issue of storing matches inside itself.

This revision now requires changes to proceed.Aug 23 2019, 7:19 PM
dhaumann updated this revision to Diff 64443.Aug 23 2019, 7:33 PM
  • Add static and const where applicable
cullmann accepted this revision.Aug 23 2019, 7:35 PM


This revision is now accepted and ready to land.Aug 23 2019, 7:35 PM
This revision was automatically updated to reflect the committed changes.
dvratil added inline comments.

@dhaumann QRegularExpression::wildcardToRegularExpression() was introduced in Qt 5.12, but Frameworks depend on 5.11 :-( So this change breaks build...

Oh, in that case can you or @cullmann simply revert this part or #ifdef it? I currently cannot at least until the weekend (sorry!).