[Development] QList
Thiago Macieira
thiago.macieira at intel.com
Thu Mar 23 20:54:53 CET 2017
On quinta-feira, 23 de março de 2017 12:28:54 PDT Marc Mutz wrote:
> On 2017-03-23 19:20, Thiago Macieira wrote:
> > Actually, the QStringView class makes me need to sit down and rewrite a
> > lot of
> > the code.
>
> This I do not understand. QStringView has nothing to do with QString,
> any more than it has to do with std::u16string. Well, if you skip that
> idea with one inheriting the other. What kind of rewrite are you
> referring to?
Well, it's dependent on the ability to derive from QStringView. As I said, I
want to explore this possibility.
There are three possible cases:
0) no derivation
Then my QString and QByteArray updates are still mostly valid and can be taken
in for Qt 6. The one change I probably want to make is to start using size_t
and ssize_t like QStringView does.
1) deriving, but not adding the d pointer
(so sizeof(QStringView) remains 2*sizeof(void*)
In this case, this "rebasing" of QString on top of QStringView will eliminate
a lot of code and require a large refactoring.
3) deriving and adding the d pointer
(so sizeof(QStringView) becomes 3*sizeof(void*))
It's (1) plus more work.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list