Port QRegExp to QRegularExpression (and some QStringRef optimisation)
ClosedPublic

Authored by ahmadsamir on Dec 26 2019, 2:46 PM.

Details

Summary

First pass.

Remove a TODO as it has been implemented with KShortUriFilter::configure()
(from dfaure, c.f. review).

Test Plan

make && ctest

Diff Detail

Repository
R241 KIO
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 26 2019, 2:46 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 26 2019, 2:46 PM
ahmadsamir requested review of this revision.Dec 26 2019, 2:46 PM
ahmadsamir added inline comments.Dec 26 2019, 2:53 PM
src/widgets/kurlcompletion.cpp
503

hasMatch() is enough here because the pattern will only match at the beginning of the subject string because of ^ anchor.

ahmadsamir updated this revision to Diff 72213.Dec 26 2019, 3:35 PM
ahmadsamir retitled this revision from Port QRegExp to QRegularExpression (and some QStringRef) optimisation to Port QRegExp to QRegularExpression (and some QStringRef optimisation).

Fix commit message typo

dfaure accepted this revision.Dec 26 2019, 11:35 PM
dfaure added inline comments.
src/urifilters/shorturi/kshorturifilter.cpp
435–436

(before I forget: this todo should be removed, KShortUriFilter::configure() does exactly that)

src/urifilters/shorturi/kshorturifilter.h
101

(pre-existing) hintRe(r) would be enough

This revision is now accepted and ready to land.Dec 26 2019, 11:35 PM
ahmadsamir updated this revision to Diff 72266.Dec 27 2019, 8:56 PM
ahmadsamir edited the summary of this revision. (Show Details)

Address comments

This revision was automatically updated to reflect the committed changes.