From 699a6d046d54d7e46c5163c628125fff4acec4c2 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Mon, 21 Feb 2022 17:58:26 +0100 Subject: 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 Reviewed-by: Assam Boudjelthia (cherry picked from commit 7b005273804d79b0a5943a4803b51f2093280367) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') 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); -- cgit v1.2.3