diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-08-16 12:25:52 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-24 13:22:36 +0000 |
commit | d0b659f1832a8bdd3ccc3a0769e38f3a8ea8fa9e (patch) | |
tree | eea718eac9738adc781fd7a08ec20dc09f397be6 /src | |
parent | 1f4632171766e1496df09f13334edfa994458f37 (diff) |
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 <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpicture_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<QPaintEngine> paintEngine; bool in_memory_only; QList<QImage> image_list; - QList<QPixmap> pixmap_list; + QVector<QPixmap> pixmap_list; QList<QBrush> brush_list; QList<QPen> pen_list; }; |