> -----Original Message-----
> From: [email protected]
> 
> [...]
> What about adding e.g. qRawUtf8() which would do like qPrintable but
> toUtf8() instead of toLocal8Bit()?

I've been pondering with this something similar too, since 

qDebug("%s", string.toUtf8().constData());

isn't really short and crisp ... But I just found out that there's a more 
elegant way: QString::snprintf and therefore also qDebug() and friends support 
the %ls placeholder, so you can write

qDebug("%ls", string.utf16());

> (If you don't otherwise care about doing conversions to local-8-bit, couldn't
> you also set the string locale to UTF-8?)

Sorry, I didn't get this question / proposal :) The issue is that qPrintable 
might be used in all sort of contexts, so changing its behavior for sure breaks 
code.

Regards

Kai
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to