"-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" as policy in kde

Oswald Buddenhagen ossi at kde.org
Tue Oct 5 23:58:32 BST 2010


On Wed, Oct 06, 2010 at 12:07:42AM +0200, Christoph Feck wrote:
> On Tuesday 05 October 2010 23:43:18 David Faure wrote:
> > For the ugliness issue, maybe we could define QL1S in kglobal.h?
> 
> "QL1S" isn't less ugly than "QLatin1String". In fact, it is uglier.
> 
yup, that's why we should have these:

typedef QLatin1Char _c;
typedef QLatin1String _;
typedef QLatin1Literal _l;
inline QString _s(const char *s) { return QString::fromLatin1(s); }
inline QString _s(const QByteArray &ba) { return QString::fromLatin1(ba, ba.size()); }

(loosely based on what i did in the qt creator debugger.)
that way our non-translated strings look like translated strings in
gnome. mwahahaha.




More information about the kde-core-devel mailing list