[KDocTools] Port QRegExp to QRegularExpression
ClosedPublic

Authored by ahmadsamir on Dec 22 2019, 5:34 PM.

Details

Summary

xslt.cpp didn't really use QRegExp as the line using it has been commented
out since 2013, removed now.

Diff Detail

Repository
R238 KDocTools
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.Dec 22 2019, 5:34 PM
Restricted Application added projects: Frameworks, Documentation. · View Herald TranscriptDec 22 2019, 5:34 PM
ahmadsamir requested review of this revision.Dec 22 2019, 5:34 PM
apol added a subscriber: apol.Dec 23 2019, 2:18 AM

LGTM otherwise

src/docbookl10nhelper.cpp
158–161

const all of these?

184–185

Just do QRegularExpressionMatch match = rxEntity.match(line);

ahmadsamir updated this revision to Diff 72037.Dec 23 2019, 6:25 AM

Make QRegularExpression objects const.

Declare and assign on one line.

ahmadsamir marked 2 inline comments as done.Dec 23 2019, 6:26 AM
ahmadsamir added inline comments.
src/docbookl10nhelper.cpp
184–185

I did it that way to indicate match is going to be re-assigned-to later on, but it does look off a bit. :)

apol accepted this revision.Dec 23 2019, 12:50 PM
apol added inline comments.
src/docbookl10nhelper.cpp
184–185

The way of saying it will be re-defined is by not making it const ;).

This revision is now accepted and ready to land.Dec 23 2019, 12:50 PM
This revision was automatically updated to reflect the committed changes.
ahmadsamir marked an inline comment as done.