diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-18 12:29:11 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-18 12:29:11 (GMT) |
commit | ae4b284a0e9fddf052fe8043940a995533ffe7c8 (patch) | |
tree | 3bf554aed7565f7578c8b25253bcb2fe10c86af4 /src | |
parent | 33f8a90c303fc19426183b30824d5eba24e5d104 (diff) | |
parent | b928bab9dde43cf3acace6dfae0ae6a4f6649650 (diff) | |
download | Qt-ae4b284a0e9fddf052fe8043940a995533ffe7c8.zip Qt-ae4b284a0e9fddf052fe8043940a995533ffe7c8.tar.gz Qt-ae4b284a0e9fddf052fe8043940a995533ffe7c8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Fix to data detaching in OpenVG pixmap data
Remove toolcheck from generic clean targets for symbian-sbsv2
Diffstat (limited to 'src')
-rw-r--r-- | src/openvg/qpixmapdata_vg.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index e4b1d02..732b484 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -200,6 +200,9 @@ bool QVGPixmapData::fromData(const uchar *buffer, uint len, const char *format, return !isNull(); } +/*! + out-of-place conversion (inPlace == false) will always detach() + */ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace) { if (image.size() == QSize(w, h)) @@ -216,11 +219,16 @@ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags else format = image.hasAlphaChannel() ? sourceFormat() : QImage::Format_RGB32; - if (inPlace && image.data_ptr()->convertInPlace(format, flags)) + if (inPlace && image.data_ptr()->convertInPlace(format, flags)) { source = image; - else + } else { source = image.convertToFormat(format); + // convertToFormat won't detach the image if format stays the same. + if (image.format() == format) + source.detach(); + } + recreate = true; } |