[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/3.5/kdelibs/kate/part
From:       André_Wöbbeking <Woebbeking () onlinehome ! de>
Date:       2006-07-07 16:07:35
Message-ID: 200607071807.35723.Woebbeking () onlinehome ! de
[Download RAW message or body]

On Friday 07 July 2006 17:54, Andreas Kling wrote:
> André Wöbbeking wrote:
> > On Friday 07 July 2006 17:26, Andreas Kling wrote:
> >> SVN commit 559544 by kling:
> >>
> >> Use the QString::unicode() optimization in kateInsideString(),
> >> helps when doing heavy highlighting work.
> >>
> >>
> >>  M  +4 -2      katehighlight.cpp
> >>
> >>
> >> --- branches/KDE/3.5/kdelibs/kate/part/katehighlight.cpp
> >> #559543:559544 @@ -65,8 +65,10 @@
> >>
> >>  inline bool kateInsideString (const QString &str, QChar ch)
> >>  {
> >> -  for (uint i=0; i < str.length(); i++)
> >> -    if (*(str.unicode()+i) == ch)
> >> +  const QChar *unicode = str.unicode();
> >> +  const uint len = str.length();
> >> +  for (uint i=0; i < len; i++)
> >> +    if (unicode[i] == ch)
> >>        return true;
> >>
> >>    return false;
> >
> > looks like QString::contains().
>
> Except that QString::contains() counts all occurences of a character,
> we stop at the first one. :-)

right, but this should be fixed in Qt4 :-)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic