summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAles Erjavec <ales.erjavec@fri.uni-lj.si>2017-09-12 19:42:36 +0200
committerAleš Erjavec <ales.erjavec324@gmail.com>2017-10-04 11:25:07 +0000
commitb839a0c2c483b59e3797f35aa1a81f3a3d072f72 (patch)
tree025e7806d14719200ac0ec11b79e5f2d00afe37e /src
parentbdcd7a97449502f92069d36196cc81064b1c02a0 (diff)
downloadqtsvg-b839a0c2c483b59e3797f35aa1a81f3a3d072f72.tar.gz
Return correct PdmDevicePixelRatioScaled metric
QSvgGenerator::metric returned incorrect value for `PdmDevicePixelRatioScaled` resulting in degenerate `devicePixelRatioF()` return value. [ChangeLog][][QSvgGenerator] Report correct devicePixelRatioF Task-number: QTBUG-63159 Change-Id: Ib45e930b6b1b6d85aea5a68dd2b1b5f16a4eed3b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvggenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index 3f4e545..d294eb2 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -856,8 +856,9 @@ int QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const
case QPaintDevice::PdmPhysicalDpiY:
return d->engine->resolution();
case QPaintDevice::PdmDevicePixelRatio:
- case QPaintDevice::PdmDevicePixelRatioScaled:
return 1;
+ case QPaintDevice::PdmDevicePixelRatioScaled:
+ return 1 * QPaintDevice::devicePixelRatioFScale();
default:
qWarning("QSvgGenerator::metric(), unhandled metric %d\n", metric);
break;