D26210: [KCoreAddons] Port QRegExp to QRegularExpression

Ahmad Samir noreply at phabricator.kde.org
Tue Dec 24 17:15:19 GMT 2019


ahmadsamir added inline comments.

INLINE COMMENTS

> apol wrote in klistopenfilesjob_unix.cpp:69
> splitRef?

I didn't even know there was a splitRef...

It'll have to be something like:

  QVector<QStringRef> pidList = out.splitRef(QRegularExpression(QStringLiteral("\\s+")), QString::SkipEmptyParts);
  // remove duplicates
  std::unique(pidList.begin(), pidList.end());

I'd better do it in a separate commit, given it's really going to change stuff here (that compiles BTW, so I know it works).

Interestingly running `lsof | wc -l` on my system gives 162709; so yeah, we should definitely replace QList with QVector and QString with QStringRef here. :D

REPOSITORY
  R244 KCoreAddons

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

To: ahmadsamir, #frameworks, mpyne, dfaure, apol
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191224/b1566f10/attachment.html>


More information about the Kde-frameworks-devel mailing list