> From: Development <development-boun...@qt-project.org> on behalf of Lars > Knoll <lars.kn...@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... Jarek _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development