[Differential] [Requested Changes To] D4110: Quick open: support also line number notions "#Lll", "#nll", "#ll"

Kevin Funk noreply at phabricator.kde.org
Fri Jan 13 08:15:19 UTC 2017


kfunk requested changes to this revision.
kfunk added a reviewer: kfunk.
kfunk added a comment.
This revision now requires changes to proceed.


  Please add tests in util/tests/test_texteditorhelpers.cpp.

INLINE COMMENTS

> texteditorhelpers.cpp:61
> +
>      const auto match = pattern.match(input);
> +    QRegularExpressionMatch match2;

Code looks a bit too branchy.

Maybe it'd make more sense if you'd just use on instance of QRegularExpressionMatch?

  auto match = pattern.match(input);
  if (!match.hasMatch()) {
      match2 = pattern.match(input);
  }
  
  // ... as before

For `pattern2` `match.captured(2).toInt()` will always return 0, which should be handled fine by the original code.

REPOSITORY
  R33 KDevPlatform

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170113/89b439ad/attachment.html>


More information about the KDevelop-devel mailing list