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

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdeui/icons
From:       David Faure <faure () kde ! org>
Date:       2010-09-17 9:16:45
Message-ID: 201009171116.46182.faure () kde ! org
[Download RAW message or body]

On Friday 17 September 2010, Michael Pyne wrote:
> SVN commit 1176228 by mpyne:
> 
> Use a global static for static QString data in KIconLoader::makeCacheKey.
> 
> ossi emailed me that fromLatin1 is preferred over fromAscii, which I
> honestly didn't believe at first (how could latin-1 be any simpler than
> ASCII?), but looking at the Qt source confirms that Latin-1 is at least
> handled more efficiently.

Yes. This is kind of historical, as in, in some countries (Russia, iirc), 
"ASCII" is often redefined to something else. See setCodecForCStrings.

> But doing this conversion just once by making it a global static makes the
> point kind of moot anyways.

Rather than a full-blown static object, you could just use 
KGlobal::staticQString().

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

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