From 43cba99bc8195a19b7c3fae73ef40b9b65d39ff6 Mon Sep 17 00:00:00 2001
From: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Date: Mon, 23 Jan 2012 15:03:50 +0100
Subject: Accessibility: send cursor move updates.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

ATs need to be able to react to cursor movement.

Change-Id: I8fbb036b6a180f555505ab529020d0aea2d25e7c
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
---
 src/gui/widgets/qplaintextedit.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 66bf560..102e7fc 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -58,6 +58,7 @@
 #include "private/qtextdocument_p.h"
 #include "qtextlist.h"
 #include "private/qtextcontrol_p.h"
+#include "qaccessible.h"
 
 #include <qtextformat.h>
 #include <qdatetime.h>
@@ -443,6 +444,10 @@ QPlainTextEditControl::QPlainTextEditControl(QPlainTextEdit *parent)
 void QPlainTextEditPrivate::_q_cursorPositionChanged()
 {
     pageUpDownLastCursorYIsValid = false;
+#ifndef QT_NO_ACCESSIBILITY
+    Q_Q(QPlainTextEdit);
+    QAccessible::updateAccessibility(q, 0, QAccessible::TextCaretMoved);
+#endif
 }
 
 void QPlainTextEditPrivate::_q_verticalScrollbarActionTriggered(int action) {
-- 
cgit v0.12