Make QPaintDevice::devicePixelRatio() return qreal
For historical reasons Qt 5 has: int QPaintDevice::devicePixelRatio() qreal QPaintDevice::devicePixelRatioF() Change the int to qreal so that Qt 6 will have qreal QPaintDevice::devicePixelRatio() qreal QPaintDevice::devicePixelRatioF() [to-be-removed] Change-Id: Ie904e02ec490cbcd2acb5dcecb193e9af4cb90f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
4073d3a10e
commit
fded035b1c
@ -83,8 +83,8 @@ public:
|
||||
int logicalDpiY() const { return metric(PdmDpiY); }
|
||||
int physicalDpiX() const { return metric(PdmPhysicalDpiX); }
|
||||
int physicalDpiY() const { return metric(PdmPhysicalDpiY); }
|
||||
int devicePixelRatio() const { return metric(PdmDevicePixelRatio); }
|
||||
qreal devicePixelRatioF() const { return metric(PdmDevicePixelRatioScaled) / devicePixelRatioFScale(); }
|
||||
qreal devicePixelRatio() const { return metric(PdmDevicePixelRatioScaled) / devicePixelRatioFScale(); }
|
||||
qreal devicePixelRatioF() const { return devicePixelRatio(); }
|
||||
int colorCount() const { return metric(PdmNumColors); }
|
||||
int depth() const { return metric(PdmDepth); }
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
The constant scaling factor used is devicePixelRatioFScale(). This enum value
|
||||
has been introduced in Qt 5.6.
|
||||
|
||||
\sa metric(), devicePixelRatioF()
|
||||
\sa metric(), devicePixelRatio()
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -284,7 +284,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn int QPaintDevice::devicePixelRatio() const
|
||||
\fn qreal QPaintDevice::devicePixelRatio() const
|
||||
|
||||
Returns the device pixel ratio for device.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user