From 996275507137564eb7e20271b6fc008052f87932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 29 Dec 2009 11:04:58 +0100 Subject: Fixed a copy-paste error in QRasterPixmapData::metric(). Calling metric() to get the device height in mm of a pixmap when using the raster engine would actually return the width.. Task-number: QTBUG-6985 Reviewed-by: Carlos Duclos (cherry picked from commit 4bd7e6930fcd9e04696aa5426691cd90ba383a32) --- src/gui/image/qpixmap_raster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index 0ba731f..2129c3b 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -375,7 +375,7 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmWidthMM: return qRound(d->width * 25.4 / qt_defaultDpiX()); case QPaintDevice::PdmHeightMM: - return qRound(d->width * 25.4 / qt_defaultDpiY()); + return qRound(d->height * 25.4 / qt_defaultDpiY()); case QPaintDevice::PdmNumColors: return d->colortable.size(); case QPaintDevice::PdmDepth: -- cgit v0.12