D27857: Port some usage of QRegExp to QRegularExpression

Aleix Pol Gonzalez noreply at phabricator.kde.org
Wed Mar 18 11:07:46 GMT 2020


apol added a comment.


  +1 overall

INLINE COMMENTS

> ksolidnotify.cpp:131
>                  QString out(p->readAll());
> -                const QStringList &pidList = out.split(QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts);
> +                const QStringList &pidList = out.split(QRegularExpression(QStringLiteral("\\s+")), QString::SkipEmptyParts);
>                  KSysGuard::Processes procs;

it could make sense to use splitRef here, unsure where this is used.

> server.cpp:671
>          // strip the screen number from the display
> -        display.remove(QRegExp(QStringLiteral("\\.[0-9]+$")));
> +        display.remove(QRegularExpression(QStringLiteral("\\.\\d+$")));
>          int i;

Why the changes from [0-9] to \d?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D27857

To: ahmadsamir, #plasma, davidedmundson, apol, broulik
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200318/5bf50a06/attachment.html>


More information about the Plasma-devel mailing list