diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-01 18:18:56 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-01 20:34:08 +0000 |
commit | e41b519cfa8c9932b88db35b2d72588a13f19e4d (patch) | |
tree | e24816121eb32c7baf095e40a9c10dbb59a8e66d /src/qmltest/quicktestevent.cpp | |
parent | a1d32483da20e8ba616bb5d32ef72928e012dac0 (diff) |
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 <jpnurmi@qt.io>
Diffstat (limited to 'src/qmltest/quicktestevent.cpp')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QQuickItem *>(item); if (sgitem) pos = sgitem->mapToScene(_pos).toPoint(); |