[Interest] QStringLiteral and UTF-16 string literal "u"

Cathal Tummon (ctummon) ctummon at cisco.com
Thu Jan 5 15:13:06 CET 2023


Hi there,

I'm trying to figure out if the "u" is still necessary at any point when using QStringLiteral.
It seems to be always prepended according to the source code:

https://codebrowser.dev/qt5/qtbase/src/corelib/text/qstringliteral.h.html
https://codebrowser.dev/qt6/qtbase/src/corelib/text/qstringliteral.h.html

But the documentation still references it in examples and even has a caveat that it could be necessary for some compilers:
https://doc.qt.io/qt-6/qstring.html#QStringLiteral

Just wondering if this is still the case and I am missing something?

Regards,
Cathal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230105/354b5f01/attachment.htm>


More information about the Interest mailing list