From e41b519cfa8c9932b88db35b2d72588a13f19e4d Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 1 Sep 2017 18:18:56 +0200 Subject: QtQuickTest::mouseEvent: when clicking a Window, use the given coords If the given item is a Window, pos was left default-initialized, and then a later check for isNull converted it to the center of the window. Use the given coordinates instead in this case. Change-Id: I659af9b665890084c29415394a84874e381ffcbe Reviewed-by: J-P Nurmi --- src/qmltest/quicktestevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index 21c467ed1f..09b7c95eef 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -155,7 +155,7 @@ namespace QtQuickTest return; } - QPoint pos; + QPoint pos = _pos.toPoint(); QQuickItem *sgitem = qobject_cast(item); if (sgitem) pos = sgitem->mapToScene(_pos).toPoint(); -- cgit v1.2.3