diff options
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 300e04b4ee..d86021cb9a 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1329,6 +1329,14 @@ QImage &QImage::operator=(const QImage &image) } /*! + \fn void QImage::swap(QImage &other) + \since 4.8 + + Swaps image \a other with this image. This operation is very + fast and never fails. +*/ + +/*! \internal */ int QImage::devType() const @@ -6689,6 +6697,10 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla if (format == newFormat) return true; + // No in-place conversion if we have to detach + if (ref > 1) + return false; + const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat]; InPlace_Image_Converter converter = *converterPtr; if (converter) |