[Development] QList
Ville Voutilainen
ville.voutilainen at gmail.com
Wed Mar 29 11:37:57 CEST 2017
On 29 March 2017 at 11:29, Marc Mutz <marc.mutz at kdab.com> wrote:
> On Wednesday 29 March 2017 09:37:04 Marc Mutz wrote:
>> Please approve the former, or propose something else.
>
> I actually meant this ^^. Approve or _propose_ something else.
>
> Just to be clear on this: I'm ready to do the work as outlined. But I will
> most certainly not write a QArrayList-as-a-class-in-Qt-5 that supports
> QArrayList<int>.
>
> IMO, QArrayList is a marker for the Qt 5->6 transition. It is not a cool new
> Qt container class. In fact, if I was to decide, I'd deprecate QArrayList on
> the spot in Qt 6 and remove it in Qt 7.
>
> If you want a QArrayList<int>, write it yourself. Well, or use
> vector<unique_ptr<int>>.
Let me take a step back. Do we need a list container that is always
indirect regardless of
the element type and uses implicit sharing?
If I start using QArrayList<indirect_type> today, and it's immediately
deprecated, what
should I use instead? vector<unique_ptr<indirect_type>>? That doesn't
do implicit sharing,
so I can't pass it by value into slots.
More information about the Development
mailing list