On Monday 08 June 2015 17:50:31 Thiago Macieira wrote: > On Monday 08 June 2015 15:40:01 Milian Wolff wrote: > > On Monday 08 June 2015 09:32:42 Thiago Macieira wrote: > > > On Monday 08 June 2015 14:57:19 Joerg Bornemann wrote: > > > > On 08-Jun-15 15:38, Marc Mutz wrote: > > > > > QList<QSize> should be QVector<QSize> > > > > > > > > Speaking of that, should we adjust the following recommendation in the > > > > docs? > > > > > > > > "For most purposes, QList is the right class to use. Its index-based > > > > API > > > > is more convenient than QLinkedList's iterator-based API, and it is > > > > usually faster than QVector because of the way it stores its items in > > > > memory. It also expands to less code in your executable." > > > > > > No. > > > > Why not? It's simply a bad recommendation. > > See the other email: we want to keep QList in the API. > > We could expand the recommendation with more uses, though.
Sorry Thiago, but imo your answers are not on topic: The documentation is /wrong/. QList is _not_ the right container class to use "for most purposes". If, inside Qt, it is currently (ab)used for historical reasons, well then fine. But can be /please/ get rid of the prominent endorsement in the documentation? Saying it should be preferred when interacting with existing (Qt) API is something altogether different than saying it should be used by default. It is *not* usually faster than QVector, and that is /especially/ because of the way it stores items in memory. That it expands to less code is afaik true, but only to a small margin, according to the measurements done by e.g. Volker Krause on KF5 code. Bye -- Milian Wolff | [email protected] | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
