[Qt-interest] argv & utf-8 code
Thiago Macieira
thiago at kde.org
Sun Aug 1 16:32:15 CEST 2010
On Sunday 1. August 2010 00.43.43 Aaron Lewis wrote:
> 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
Exactly. THAT was the source of your problem, because you didn't declare which
encoding to use there.
Now you fix your problem by selecting the encoding properly, like
QString::fromUtf8.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100801/497b32f3/attachment.bin
More information about the Qt-interest-old
mailing list