[Qt-interest] argv & utf-8 code

1+1=2 dbzhang800 at gmail.com
Sun Aug 1 05:53:23 CEST 2010


On Sun, Aug 1, 2010 at 11:43 AM, Aaron Lewis <aaron.lewis1989 at gmail.com> wrote:
> -----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.
No, you should not use DEFINES += QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_ASCII in your case.

Debao


>
>>
>>
>>
>> _______________________________________________
>> 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