From 3a71c9700fbef984dd2a59edb442d71f4a5b60b0 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Sat, 19 Jul 2014 23:28:54 +0200 Subject: Fix contentsRect calculation. QRectF takes either two points (top left / bottom right), or separate coordinates (x/y) together with dimensions for width and height. Change-Id: Iac20e2abaa4a273ddf7605ffa306220717ae283a Reviewed-by: Jocelyn Turcotte --- src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine') diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index e37a07960..d215fefc4 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -94,7 +94,7 @@ QRectF RenderWidgetHostViewQtDelegateQuick::contentsRect() const { QPointF scenePoint = mapToScene(QPointF(0, 0)); QPointF screenPos = window()->mapToGlobal(scenePoint.toPoint()); - return QRectF(screenPos, QPointF(width(), height())); + return QRectF(screenPos.x(), screenPos.y(), width(), height()); } void RenderWidgetHostViewQtDelegateQuick::setKeyboardFocus() -- cgit v1.2.3