[Development] QString and related changes for Qt 6

Jaroslaw Kobus Jaroslaw.Kobus at qt.io
Wed May 13 20:48:34 CEST 2020


> From: Development <development-bounces at qt-project.org> on behalf of Thiago Macieira <thiago.macieira at intel.com>
> Sent: Wednesday, May 13, 2020 6:21 PM
> To: development at qt-project.org
> Subject: Re: [Development] QString and related changes for Qt 6
> 
> 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.

Good to hear. And I hope that Marc will resurrect soon after his veto.

Regards

Jarek


More information about the Development mailing list