[Qt-interest] argv & utf-8 code

Scott Aron Bloom Scott.Bloom at onshorecs.com
Sun Aug 1 06:39:40 CEST 2010


The point of the defines is to force you to decide how the "char *"
array should be converted to QString rather than assuming its latin1.

Scott

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Aaron Lewis
Sent: Saturday, July 31, 2010 8:44 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] argv & utf-8 code

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/01/2010 10:30 AM, Thiago Macieira wrote:
> On Saturday 31. July 2010 22.24.32 Aaron Lewis wrote:
>> DEFINES += QT_NO_CAST_TO_ASCII,QT_NO_CAST_FROM_ASCII
> 
> With a space, not a comma.

So it's like this:
	DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII

But well , it produces another problem , i can't use
`QString(*(++argv))' to create a QString instance anymore.

/usr/include/qt4/QtCore/qstring.h:588: error: ?QString::QString(const
char*)? is private

See Here:
private:
#if defined(QT_NO_CAST_FROM_ASCII) &&
!defined(Q_NO_DECLARED_NOT_DEFINED)
    QString &operator+=(const char *s);
    QString &operator+=(const QByteArray &s);
    QString(const char *ch);
    QString(const QByteArray &a);
    QString &operator=(const char  *ch);
    QString &operator=(const QByteArray &a);
#endif

Do i made any mistakes here ? Thanks.

> 
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxU7W8ACgkQvf41sEptMqAaPgCgyLwVLJzsWpfdQx/0c8QFJXPD
6WYAoNBjZRKnPiWwsrKygOzj2X6Y6GYY
=tITy
-----END PGP SIGNATURE-----
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list