[Development] QString and related changes for Qt 6
Thiago Macieira
thiago.macieira at intel.com
Wed May 13 18:21:41 CEST 2020
On terça-feira, 12 de maio de 2020 22:57:31 PDT Jaroslaw Kobus wrote:
> That's why I've mentioned the better option: aggregation: QStringView could
> be a member of QString. However, the downside would be that every time you
> want to call a const method for QString, you would need to first get access
> to the QStringView member. The advantage is that in this way you may easily
> integrate different interfaces inside one class.
This is more or less what we want to do. QString in Qt 6 is {begin, size, d}
and QStringView has always been {begin, size}. So, yeah, it can be done.
The idea is indeed to offload the majority of the non-mutating methods to the
same functions, from inline code. There's no reason to have both
QString::indexOf and QStringView::indexOf entry points in the library.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Development
mailing list