summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-05-13 13:30:46 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-06-10 23:47:15 +0000
commitebee64645a672e82ffca3b48dbc007cd2f2a52f4 (patch)
tree0ab5e31523110666cac37f2b8cb76235efab929b /src/plugins/platforms/ios/qiosscreen.mm
parentcbe62a0e6d0caba8dcb0a63d3af3c458a6298e10 (diff)
darwin: Add Foundation conversion functions for QRect/QRectF
The fromCGRect function was left out for QRect, as the foundation type is using CGFloats internally. Clients should use an explicit QRectF::toRect() when potentially throwing away precision. Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 285b90bcd1..ea17e34fe2 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -231,11 +231,11 @@ void QIOSScreen::updateProperties()
QRect previousGeometry = m_geometry;
QRect previousAvailableGeometry = m_availableGeometry;
- m_geometry = fromCGRect(m_uiScreen.bounds).toRect();
+ m_geometry = QRectF::fromCGRect(m_uiScreen.bounds).toRect();
#ifndef Q_OS_TVOS
- m_availableGeometry = fromCGRect(m_uiScreen.applicationFrame).toRect();
+ m_availableGeometry = QRectF::fromCGRect(m_uiScreen.applicationFrame).toRect();
#else
- m_availableGeometry = fromCGRect(m_uiScreen.bounds).toRect();
+ m_availableGeometry = QRectF::fromCGRect(m_uiScreen.bounds).toRect();
#endif
#ifndef Q_OS_TVOS
@@ -279,7 +279,7 @@ void QIOSScreen::updateProperties()
// before being output on the physical display. We have to take this into account when
// computing the physical size. Note that unlike the native bounds, the physical size
// follows the primary orientation of the screen.
- physicalGeometry = mapBetween(nativeOrientation(), primaryOrientation, fromCGRect(m_uiScreen.nativeBounds).toRect());
+ physicalGeometry = mapBetween(nativeOrientation(), primaryOrientation, QRectF::fromCGRect(m_uiScreen.nativeBounds).toRect());
} else {
physicalGeometry = QRectF(0, 0, m_geometry.width() * devicePixelRatio(), m_geometry.height() * devicePixelRatio());
}