D23625: Use QString::count(QChar) over QString::split().length() - 1

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Mon Sep 2 12:42:46 BST 2019


kossebau added inline comments.

INLINE COMMENTS

> kossebau wrote in normalvimode.cpp:3844
> Guess the complete change missed to enter the commit, and review did not catch it,
> Well spotted, I shall do a follow-up.

Ah, no, textLines.last().length() needs the string section, so just a plain count would not be enough, only if combining with a QString::section call later, I now remember.
And some other patch simply turned this into splitRef, so just one alloc here currently.

So rather something where I messed up during patch juggling.

Perhaps still can be ยต-optimized with using lastindexof instead :)

REPOSITORY
  R39 KTextEditor

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

To: kossebau, #kate, cullmann
Cc: apol, cullmann, kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190902/58010dc9/attachment.html>


More information about the KWrite-Devel mailing list