Fix to data detaching in OpenVG pixmap data
authorJani Hautakangas <jani.hautakangas@nokia.com>
Tue, 18 Jan 2011 08:59:34 +0000 (10:59 +0200)
committerJason McDonald <jason.mcdonald@nokia.com>
Tue, 18 Jan 2011 16:14:11 +0000 (02:14 +1000)
commit85c868964979946a783f3c05462b2045c9b3efef
tree754574ec958036ce374411cb144af2d4d44f2121
parent340bfb6d4b324dfc124ea9fd03d796eed4cc5fb5
Fix to data detaching in OpenVG pixmap data

QImage::converToFormat(format) won't detach QImage if
format stays the same. Because of this, internal QImage
buffer of QVGPixmapData was not deep copied. Drawing
to QPixmap target modified the original QImage that was
used to create QPixmap and in some cases crashed because
paint engine referred to wrong target.

Task-number: QT-4407
Reviewed-by: Jason Barron
(cherry picked from commit b928bab9dde43cf3acace6dfae0ae6a4f6649650)
src/openvg/qpixmapdata_vg.cpp