diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2015-04-14 20:01:15 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@digia.com> | 2015-04-15 12:54:15 +0200 |
commit | 7ec765b1d10d26de2e13cb22364e45427b654d86 (patch) | |
tree | b41a1ead7cd4bee427fd3b4f4b3a5e4a9ea47e99 /src/gui/image | |
parent | 56b72d7809a6016149668b7df0dfd35022ff01c6 (diff) |
Use qreal for devicePixelRatio everywhere
QPaintDevice::devicePixelRatio() -> devicePixelRatioF()
Implement PdmDevicePixelRatioScaled for QPaintDevice subclasses.
Remove instances of casting to int.
Change-Id: I6e769d21e889bf8f88aedc1c49b53fef20a6709c
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qpicture.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index b63be19153..02a510ce29 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -961,6 +961,9 @@ int QPicture::metric(PaintDeviceMetric m) const case PdmDevicePixelRatio: val = 1; break; + case PdmDevicePixelRatioScaled: + val = 1 * QPaintDevice::devicePixelRatioFScale; + break; default: val = 0; qWarning("QPicture::metric: Invalid metric command"); |