[kde-cli-tools] Port QRegExp to QRegularExpression
Needs ReviewPublic

Authored by ahmadsamir on Mar 12 2020, 9:24 AM.

Details

Reviewers
apol
davidedmundson
Group Reviewers
Plasma
Summary

filetypestest fails but it's not related to this change (fails on master
too).

Test Plan

make && ctest

Diff Detail

Repository
R126 KDE CLI Utilities
Branch
l-qregexp (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23606
Build 23624: arc lint + arc unit
ahmadsamir created this revision.Mar 12 2020, 9:24 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 12 2020, 9:24 AM
ahmadsamir requested review of this revision.Mar 12 2020, 9:24 AM
ahmadsamir updated this revision to Diff 77481.Mar 12 2020, 9:25 AM
ahmadsamir edited the summary of this revision. (Show Details)

Fix commit message

apol added inline comments.Mar 12 2020, 12:24 PM
kstart/kstart.cpp
184

Wouldn't it be easier here to just do windowtitle.compare(info.name(), Qt::CaseInsensitive) and skip the regex?

ahmadsamir added inline comments.Mar 12 2020, 12:53 PM
kstart/kstart.cpp
184

I thought about that, but looking at the code I found:

void KStart::sendRule() {
    KXMessages msg;
    QString message;
    if( !windowtitle.isEmpty() )
        message += QStringLiteral("title=") + windowtitle + QStringLiteral("\ntitlematch=3\n"); // 3 = regexp match

which made me leave the regex in...