diff options
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 36595025f5..d33e1053c8 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3134,6 +3134,8 @@ void QImage::mirrored_inplace(bool horizontal, bool vertical) return; detach(); + if (!d->own_data) + *this = copy(); do_mirror(d, d, horizontal, vertical); } @@ -3280,6 +3282,8 @@ void QImage::rgbSwapped_inplace() return; detach(); + if (!d->own_data) + *this = copy(); switch (d->format) { case Format_Invalid: @@ -4763,7 +4767,7 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla return true; // No in-place conversion if we have to detach - if (ref.load() > 1 || ro_data) + if (ref.load() > 1 || !own_data) return false; InPlace_Image_Converter converter = qimage_inplace_converter_map[format][newFormat]; |