[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: inefficient QString coding practice
From: "Dr. Juergen Pfennig" <info () j-pfennig ! de>
Date: 2004-03-14 9:38:19
Message-ID: 200403141038.20187.info () j-pfennig ! de
[Download RAW message or body]
On Saturday 13 March 2004 19:35, Lars Knoll wrote:
> We actually know about this problem and already have a solution for this in
> Qt 4. It's called QLatin1String and is a simple wrapper around a const char
> *.
>
> So you can then write
>
> if(str == QLatin1String("foo")) { ... }
>
> and the code will
> a) compile with NO_CAST_ASCII and
> b) avoid the temporary QString.
That's a reasonable solution for those who want to keep NO_CAST_ASCII
compatibility. Until Qt 4.0 one could define a local macro to this.
Jürgen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic