[Development] QList for Qt 6

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue May 21 10:02:27 CEST 2019


Il 20/05/19 19:08, NIkolai Marchenko ha scritto:
> This rather nicely proves my point. Jason isn't even new to this list 
> and he didn't realize the problems.
> No, community as a whole did _not _ have "years and years" to port away 
> from QList

Here's the practical QList test: which ones of the following guarantee 
integrity of references, i.e., _heap allocate every single element? (The 
problem is that someone may rely on this property. __Qt itself_ has 
codepaths relying on it.)

1) QList<int>
2) QList<double>
3) QList<QPoint>
4) QList<QPointF>
5) QList<QVector2D>
6) QList<QVector3D>
7) QList<MyPoint> // where: struct MyPoint { int x, y; };
8) QList<QPair<int, int>>
9) QList<std::pair<int, int>>
10) QList<QColor>
11) QList<QString>
12) QList<QVariant>
13) QList<QImage>
14) QList<void *>
15) QList<QObject *>
16) QList<QScopedPointer<QObject>>
17) QList<QSharedPointer<QObject>>

Cheers,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190521/9e60ce71/attachment.bin>


More information about the Development mailing list