On 2020-05-13 20:48, Jaroslaw Kobus wrote:
From: Development <development-boun...@qt-project.org> on behalf of Thiago Macieira <thiago.macie...@intel.com>
Sent: Wednesday, May 13, 2020 6:21 PM
To: development@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.

Had you looked into qstring.cpp (I know it hurts!), you'd've seen that it's already implemented that way. But Neither does QString aggregate a QStringView nor does it inherit it.

So, there's no resurrection coming because no death was caused.

Thanks,
Marc
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to