From d0b659f1832a8bdd3ccc3a0769e38f3a8ea8fa9e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 16 Aug 2014 12:25:52 +0200 Subject: QPicture: don't hold pixmaps in QList QPixmap is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Change-Id: I82bb9a88e7030e566f39421cd78babcf01bce285 Reviewed-by: Konstantin Ritt Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/gui/image/qpicture_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h index 56e6e1249c..d8623f0fed 100644 --- a/src/gui/image/qpicture_p.h +++ b/src/gui/image/qpicture_p.h @@ -48,6 +48,7 @@ #include "QtCore/qatomic.h" #include "QtCore/qbuffer.h" #include "QtCore/qobjectdefs.h" +#include "QtCore/qvector.h" #include "QtGui/qpicture.h" #include "QtGui/qpixmap.h" #include "QtGui/qpen.h" @@ -151,7 +152,7 @@ public: QScopedPointer paintEngine; bool in_memory_only; QList image_list; - QList pixmap_list; + QVector pixmap_list; QList brush_list; QList pen_list; }; -- cgit v1.2.3