Blame SOURCES/0014-Accessibility-event-is-sent-on-item-s-geometry-chang.patch

b602f4
From 514a69659a56fda410f4ab955f03c0d2a38b52f9 Mon Sep 17 00:00:00 2001
b602f4
From: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io>
b602f4
Date: Tue, 10 Nov 2020 14:58:12 +0100
b602f4
Subject: [PATCH 14/28] Accessibility event is sent on item's geometry change
b602f4
MIME-Version: 1.0
b602f4
Content-Type: text/plain; charset=UTF-8
b602f4
Content-Transfer-Encoding: 8bit
b602f4
b602f4
In case of enabled accessibility, whenever the geometry
b602f4
of a QQuickItem changes, accessibility module is notified
b602f4
by a LocationChange event. This enables responding to this
b602f4
by for example moving the accessibility frame on the screen.
b602f4
b602f4
Task-number: QTBUG-79611
b602f4
Change-Id: I808e835384ef42bba2e9aabecf4be3cda07859fe
b602f4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
b602f4
(cherry picked from commit def81070668f101e1e2cbb46d586bbab64c8e00f)
b602f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
b602f4
---
b602f4
 src/quick/items/qquickitem.cpp | 8 ++++++++
b602f4
 1 file changed, 8 insertions(+)
b602f4
b602f4
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
b602f4
index 67c4611d9e..ddd67522b9 100644
b602f4
--- a/src/quick/items/qquickitem.cpp
b602f4
+++ b/src/quick/items/qquickitem.cpp
b602f4
@@ -3753,6 +3753,14 @@ void QQuickItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeo
b602f4
         emit widthChanged();
b602f4
     if (change.heightChange())
b602f4
         emit heightChanged();
b602f4
+#if QT_CONFIG(accessibility)
b602f4
+    if (QAccessible::isActive()) {
b602f4
+        if (QObject *acc = QQuickAccessibleAttached::findAccessible(this)) {
b602f4
+            QAccessibleEvent ev(acc, QAccessible::LocationChanged);
b602f4
+            QAccessible::updateAccessibility(&ev;;
b602f4
+        }
b602f4
+    }
b602f4
+#endif
b602f4
 }
b602f4
 
b602f4
 /*!
b602f4
-- 
b602f4
2.31.1
b602f4