[Development] QString and related changes for Qt 6

Jaroslaw Kobus Jaroslaw.Kobus at qt.io
Tue May 12 11:31:26 CEST 2020

> From: Development <development-bounces at qt-project.org> on behalf of Lars Knoll <lars.knoll at qt.io>
> Sent: Tuesday, May 12, 2020 9:49 AM
> To: Qt development mailing list
> Subject: [Development] QString and related changes for Qt 6
> * QStringView and QByteArrayView need to be completed to implement all const methods of QString/QByteArray

Wondering about this point. Looks like we aim for:

QString API = QStringView API (const API) + mutator API

So, just an idea: instead of repeating the common API part in QString and QStringView, what about making it one common? E.g. what about:
- deriving QString from QStringView (and adding mutator API)
or (maybe even better):
- aggregating QStringView object as a part of QString API and giving accesor for it, like:

QStringView QString::stringView();

In this way we are getting access to read-only API part of QString API. And we are not anymore worried about manual sync of the QString const API part and QStringView API. The same of course regards to QByteArray & QByteArrayView...


More information about the Development mailing list