This is a discussion on Re: knetworkmanager -> kdereview - KDE ; On Thursday 30 March 2006 14:30, Hasso Tepper wrote: > David Faure wrote: > > On Thursday 30 March 2006 14:13, Hasso Tepper wrote: > > > Stephan Kulow wrote: > > > > That's most likely due to the ...
On Thursday 30 March 2006 14:30, Hasso Tepper wrote:
> David Faure wrote:
> > On Thursday 30 March 2006 14:13, Hasso Tepper wrote:
> > > Stephan Kulow wrote:
> > > > That's most likely due to the NO_CAST defines in our SVN modules.
> > > > Easy fix though.
> > >
> > > Might be lack of coffee, but doesn't say me too much. More obvious
> > > pointers, please?
> > Where a char* is passed to a QString, use either
> > QString::fromLatin1(str)
> > QString::fromUtf8(str)
> > or
> > QString::fromLocal8Bit(str)
> > depending on the locale of the char* str.
Actually I meant the other way round; the above is good practice, but not mandatory
since it's usual to pass ascii-only constants to QStrings, e.g. QString("foo").
What I meant was rather .latin1(), .utf8() and .local8Bit() when passing a QString to a char*.
> Err. Yes, that I understand. Although easy to fix, it means a lot of work,
> seems (there is a lot of similar errors).
Yes, but the non-latin1 users will thank you for doing it
> But what's this NO_CAST thingy?
By default passing a QString to a char * is allowed. In KDE SVN it's not,
due to -DQT_NO_ASCII_CAST being set, which disables this conversion in QString.
David Faure, email@example.com, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<