D26177: Port QRegExp to QRegularExpression

David Faure noreply at phabricator.kde.org
Tue Dec 24 09:27:40 GMT 2019


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> kconfig_compiler.cpp:646
>  {
> -    int i = path.lastIndexOf(QRegExp(QStringLiteral("[/\\]")));
> +    int i = path.lastIndexOf(QRegularExpression(QStringLiteral("[/\\\\]")));
>      if (i >= 0) {

I wonder if qMax(path.lastIndexOf('/'), path.lastIndexOf('\\')) wouldn't be simpler and faster :-)

But yes you're right, might as well just delete this function.
I bet someone didn't realize, LONG ago, that even on Windows, Qt uses '/' in almost all of the API.

REPOSITORY
  R237 KConfig

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

To: ahmadsamir, #frameworks, dfaure, ervin, 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/92a97334/attachment.html>


More information about the Kde-frameworks-devel mailing list