Actually set devicePixelRatio on copy.

Followup to 7b9d4531 - the second part refactors
to call setDevicePixelRatio but the call itself
was left out.

Change-Id: I3e36452603fe1d7d53fa1a74d87169efea1c2e78
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Morten Johan Sørvig 2013-04-18 09:41:23 +02:00 committed by The Qt Project
parent 835e720c7e
commit 6e73061c58

View File

@ -244,6 +244,7 @@ QImage QRasterPlatformPixmap::toImage(const QRect &rect) const
QImage newImage(image.scanLine(clipped.y()) + clipped.x() * (du / 8),
clipped.width(), clipped.height(),
image.bytesPerLine(), image.format());
newImage.setDevicePixelRatio(image.devicePixelRatio());
return newImage;
} else {
return image.copy(clipped);