[Development] QList
Alejandro Exojo
alex at vikingsoft.eu
Tue Apr 25 22:49:16 CEST 2017
On Tuesday 25 April 2017 16:35:01 Thiago Macieira wrote:
> QVector and QList don't have the same API. They're slightly different.
> What'sm ore, QList has a beginning-of-list optimisation, whereas QVector
> doesn't (not even my copy, I stopped development shortly before I got to
> that part, even if I did add a QArrayData::GrowsBackward flag to support
> the case).
> (...)
> So, no, we can't implement that in Qt 5. In Qt 6, we've already agreed we
> don't want this mess, so QList as it is simply goes away.
By the way, which is the exit strategy for QQueue? Specially given the first
paragraph that I quoted. It's been a while since the whole thread, but I don't
think it's been mentioned, and given that Ville will be making a summary, it's
worth refreshing, I think.
It's hard to measure how common the usage of a class is, but I think that
QList<SomeQObject*> is quite a common use case for when you have something
that is similar enough to a queue, but not necessarily strict. Like when you
add pointers to requests to the pending ones list. Most likely the ones added
before will be removed before. So what's the suggested alternative here?
std::deque?
--
Viking Software, Qt and C++ developers for hire
http://www.vikingsoft.eu
More information about the Development
mailing list