summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 2787be53d0..cced1d9942 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2239,7 +2239,7 @@ bool QImage::reinterpretAsFormat(Format format)
/*!
\since 5.13
- Detach and convert the image to the given \a format in place.
+ Converts the image to the given \a format in place, detaching if necessary.
The specified image conversion \a flags control how the image data
is handled during the conversion process.
@@ -2249,7 +2249,7 @@ bool QImage::reinterpretAsFormat(Format format)
void QImage::convertTo(Format format, Qt::ImageConversionFlags flags)
{
- if (!d || format == QImage::Format_Invalid)
+ if (!d || format == QImage::Format_Invalid || d->format == format)
return;
detach();