On 2019-07-10 10:50, Arnaud Clere wrote:
Hi all,

So, do I understand correctly that:
1. QUtf8String may be required in Qt7 to solve problems due to C++2x char8_t

I wouldn't say required. I also don't think it needs to wait until Qt 7. Qt 7 is where we may depend on C++20 and can use char8_t in the interface and implementation, but we should certainly not wait for that to add the class. It's certainly a good idea, IMO, to have views and owning containers that operate on L1, UTF-8 and UTF-16 strings. The views are more important.

2. QByteArray methods currently operating on latin1 may be restricted
to ascii in Qt6 to avoid problems when const char* input really is
utf8

I have no opinion on that.

3. QLatin1String may become QLatin1StringView by Qt7

Qt 6. We can add the name as an alias now, make QLatin1String an owning container for Qt 6.0 (it breaks no code, just makes it slower, and the port is trivial), and QLatin1StringView becomes what QLatin1String is now.

4. These classes will be independent except maybe for a common internal class

Yes. Or separate instantiations of the same class template. They also should convert to QByteArray. Just not by public inheritance.

Thannks,
Marc
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to