From kde-commits Fri Sep 17 09:16:45 2010 From: David Faure Date: Fri, 17 Sep 2010 09:16:45 +0000 To: kde-commits Subject: Re: KDE/kdelibs/kdeui/icons Message-Id: <201009171116.46182.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=128471510025409 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).