diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-05-13 13:30:46 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-06-10 23:47:15 +0000 |
commit | ebee64645a672e82ffca3b48dbc007cd2f2a52f4 (patch) | |
tree | 0ab5e31523110666cac37f2b8cb76235efab929b /src/plugins/platforms/ios/quiview.mm | |
parent | cbe62a0e6d0caba8dcb0a63d3af3c458a6298e10 (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/quiview.mm')
-rw-r--r-- | src/plugins/platforms/ios/quiview.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index b199f28149..088d651e2e 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -60,7 +60,7 @@ - (id)initWithQIOSWindow:(QIOSWindow *)window { - if (self = [self initWithFrame:toCGRect(window->geometry())]) + if (self = [self initWithFrame:window->geometry().toCGRect()]) m_qioswindow = window; m_accessibleElements = [[NSMutableArray alloc] init]; @@ -153,7 +153,7 @@ // from what we end up with after applying window constraints. QRect requestedGeometry = m_qioswindow->geometry(); - QRect actualGeometry = fromCGRect(self.frame).toRect(); + QRect actualGeometry = QRectF::fromCGRect(self.frame).toRect(); // Persist the actual/new geometry so that QWindow::geometry() can // be queried on the resize event. @@ -188,7 +188,7 @@ QRegion region; if (m_qioswindow->isExposed()) { - QSize bounds = fromCGRect(self.layer.bounds).toRect().size(); + QSize bounds = QRectF::fromCGRect(self.layer.bounds).toRect().size(); Q_ASSERT(m_qioswindow->geometry().size() == bounds); Q_ASSERT(self.hidden == !m_qioswindow->window()->isVisible()); |