summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2019-01-24 13:34:51 +0100
committerJüri Valdmann <juri.valdmann@qt.io>2019-02-13 12:30:56 +0000
commitab67256fe8d9df5be95919852100f7f914ddbb81 (patch)
treef9ce6177615a33a8a7b092b1c8bf45b4e2245b9c /src/core/type_conversion.h
parentc4328812031d1efd3409335e63b0e82f76f00924 (diff)
Simplify visual properties handling in RenderWidgetHostViewQt
Replace separate notifications from delegate with one combined notification and change detection. Store view rect, window rect and screen info in RWHVQ to ensure the properties are in a consistent state. Change-Id: Icef8a17e72882f56db249f5553b6cf554e1f91dc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r--src/core/type_conversion.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 96b4ecadc..7b1f1b4d6 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -172,6 +172,11 @@ inline gfx::SizeF toGfx(const QSizeF& size)
return gfx::SizeF(size.width(), size.height());
}
+inline gfx::Rect toGfx(const QRect &rect)
+{
+ return gfx::Rect(rect.x(), rect.y(), rect.width(), rect.height());
+}
+
inline QSizeF toQt(const gfx::SizeF &size)
{
return QSizeF(size.width(), size.height());