aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-02-21 17:58:26 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-02 17:14:43 +0000
commit699a6d046d54d7e46c5163c628125fff4acec4c2 (patch)
treeedd4b081c07f61c24e3aa240aacaec236274d4e7
parente946d2e5b3cf7449a57bf1c67e62b5e70042ea55 (diff)
Fix tst_qquickaccessible::hitTest() on Android
The issue was that on Android the main windows always takes the whole display size, so the width and height properties are ignored. Task-number: QTBUG-77371 Change-Id: I6942235498d47ac945287a607e267e86a9a2069b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7b005273804d79b0a5943a4803b51f2093280367) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
index 7cba462ff8..1383d89ed2 100644
--- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
+++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
@@ -504,7 +504,8 @@ void tst_QQuickAccessible::hitTest()
QAccessibleInterface *windowIface = QAccessible::queryAccessibleInterface(window.get());
QVERIFY(windowIface);
QAccessibleInterface *rootItem = windowIface->child(0);
- QRect rootRect = rootItem->rect();
+ // on Android the main window is always shown fullscreen
+ QRect rootRect = QRect(window->x(), window->y(), window->width(), window->height());
// check the root item from app
QAccessibleInterface *appIface = QAccessible::queryAccessibleInterface(qApp);