Skip to content

Commit

Permalink
do not detach destination image when settings its dots per meter in Q…
Browse files Browse the repository at this point in the history
…Image::convertToFormat()

Signed-off-by: Ivailo Monev <[email protected]>
  • Loading branch information
fluxer committed Dec 14, 2021
1 parent 64bfd2c commit 042e13b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/image/qimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2712,11 +2712,10 @@ QImage QImage::convertToFormat(Format format, Qt::ImageConversionFlags flags) co
const Image_Converter converter = converter_map[d->format][format];
if (converter) {
QImage image(d->width, d->height, format);

QIMAGE_SANITYCHECK_MEMORY(image);

image.setDotsPerMeterY(dotsPerMeterY());
image.setDotsPerMeterX(dotsPerMeterX());
image.d->dpmx = dotsPerMeterX();
image.d->dpmy = dotsPerMeterY();

converter(image.d, d, flags);
return image;
Expand Down

0 comments on commit 042e13b

Please sign in to comment.