Port QRegExp to QRegularExpression
ClosedPublic

Authored by ahmadsamir on Dec 23 2019, 6:01 PM.

Details

Summary

One instance of QString::remove(QRegExp... was replaced to use the
replace overload that takes a QLatin1String.

In RunnerContext::restore, change the regex so that "id" is at least one
character, otherwise using d->launchCounts[id] doesn't make sense.

Diff Detail

Repository
R308 KRunner
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 23 2019, 6:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 23 2019, 6:01 PM
ahmadsamir requested review of this revision.Dec 23 2019, 6:01 PM
apol added a comment.Dec 23 2019, 6:04 PM

LGTM otherwise

src/runnercontext.cpp
575–580

const

ahmadsamir updated this revision to Diff 72113.Dec 23 2019, 6:29 PM

use const (QRegularExpressionMatch is an object too)

ahmadsamir updated this revision to Diff 72116.Dec 23 2019, 6:46 PM
ahmadsamir marked an inline comment as done.

More const

apol accepted this revision.Jan 6 2020, 11:37 PM
This revision is now accepted and ready to land.Jan 6 2020, 11:37 PM
This revision was automatically updated to reflect the committed changes.