diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-03-20 09:48:43 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-03-21 11:51:01 +0000 |
commit | 7483ad1f1d760d024919ad2001170a46bed6ef7d (patch) | |
tree | e13c39d5121c30976034a7ed2aa5661173bf8ae7 /tests | |
parent | 1656402605b501649bc842e2b9aa6d331d4e675a (diff) | |
download | qt-creator-7483ad1f1d760d024919ad2001170a46bed6ef7d.tar.gz |
Squish: Fix helper function for small resolutions
Depending on the screen size the context menu may be
oriented differently depending on the point where the
context menu had been triggered.
Change-Id: Iae3834283e8e34ed44e57237561f1367cdaae108
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/editor_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index d59280f161..b1ea1bb1bd 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -78,7 +78,10 @@ def menuVisibleAtEditor(editor, menuInList): return True return False menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500) - success = menu.visible and widgetContainsPoint(editor, menu.mapToGlobal(QPoint(0, 0))) + topLeft = menu.mapToGlobal(QPoint(0, 0)) + bottomLeft = menu.mapToGlobal(QPoint(0, menu.height)) + success = menu.visible and (widgetContainsPoint(editor, topLeft) + or widgetContainsPoint(editor, bottomLeft)) if success: menuInList[0] = menu return success |