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

List:       kde-core-devel
Subject:    Re: [PATCH] Cache returned KIconLoader pixmaps in 4.5.2
From:       Matthias Fuchs <mat69 () gmx ! net>
Date:       2010-09-15 7:50:44
Message-ID: 201009150950.45072.mat69 () gmx ! net
[Download RAW message or body]


Am Dienstag 14 September 2010, 04:36:53 schrieb Michael Pyne:
> On Monday, September 13, 2010 20:37:11 Ingo Klöcker wrote:
> > Maybe not, but something like
> > 
> >   QString("%1_%2_%3").arg(name).arg(size).arg(overlays.join("_"))
> > 
> > is completely braindead because it's horribly slow.
> > 
> > What about
> > 
> >   return ( group == KIconLoader::User ? QLatin1Literal("$kicou_") :
> > QLatin1Literal("$kico_") ) % name
> > 
> >          % QLatin1Char('_')
> >          % QString::number(size)
> >          % QLatin1Char('_')
> >          % overlays.join("_")
> > 
> >          % ( group >= 0 ? mpEffect.fingerprint(group, state) :
> > QString("noeffect") ); ?
> 
> I actually didn't know about QStringBuilder, so thanks for introducing me
> to that and the new operator% for QString that it magically enables.

Well it is pretty new (Qt 4.6, not sure what KDE 4.5 depends on) and I just 
stumbled over it when looking at the QString docs once. ;)
It is nice to have a way of speeding things up a little with such ease.


["signature.asc" (application/pgp-signature)]

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

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