[Interest] why does Qt prefer to return QList over QVector?

Frédéric Marchal frederic.marchal at wowtechnology.com
Tue Jan 27 10:55:13 CET 2015


On Tuesday 27 January 2015 10:34:57, Giuseppe D'Angelo wrote :
> Il 27/01/2015 09:41, Mark Gaiser ha scritto:
> > A somewhat related question, why is there no QList::reserve()?
> 
> There is, what's missing is resize(). (Fundamentally that "shared part"
> behind QList has no code dealing with shrinking.) I've got a WIP on
> gerrit, if only I get the time to work on it again...

The missing resize() is QTBUG-42732 
(https://bugreports.qt.io/browse/QTBUG-42732).

A patch is being reviewed.

Frederic



More information about the Interest mailing list