diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-06-29 17:47:53 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-06-30 12:45:58 (GMT) |
commit | 176024dfea7d354451a65b61fa2e82dd422b4dfb (patch) | |
tree | a631b5be0010489f645b7ca553929ec1361437a2 /src/gui/image/qpixmap_raster_p.h | |
parent | c16162214eb8757a62e221c34d38cefc402e5b05 (diff) | |
download | Qt-176024dfea7d354451a65b61fa2e82dd422b4dfb.zip Qt-176024dfea7d354451a65b61fa2e82dd422b4dfb.tar.gz Qt-176024dfea7d354451a65b61fa2e82dd422b4dfb.tar.bz2 |
Add the conversion in-place for QPixmap::fromImageReader() on raster.
Since raster uses QImage internal, QPixmap::fromImageReader() can use
conversion in-place of the image. This avoid a memory peak during the
conversion and is a bit faster.
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/image/qpixmap_raster_p.h')
-rw-r--r-- | src/gui/image/qpixmap_raster_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h index a46e054..36a9b2f 100644 --- a/src/gui/image/qpixmap_raster_p.h +++ b/src/gui/image/qpixmap_raster_p.h @@ -74,6 +74,7 @@ public: void fromFile(const QString &filename, Qt::ImageConversionFlags flags); bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); + void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); bool scroll(int dx, int dy, const QRect &rect); |