1
From 205f4abb9b980854e93ed58f4c2f245f63fe8116 Mon Sep 17 00:00:00 2001
2
From: Frederik Gladhorn <frederik.gladhorn@nokia.com>
3
Date: Mon, 27 Jun 2011 14:01:19 +0200
4
Subject: [PATCH] Notify about name/description changes for qml.
6
Declarative items would not emit the name/description/role
7
changed signals as they are supposed to.
8
Neither was updateAccessibility called.
9
Index: qt4-x11-4.7.4/src/declarative/accessible/qdeclarativeaccessible_p.h
10
===================================================================
11
--- qt4-x11-4.7.4.orig/src/declarative/accessible/qdeclarativeaccessible_p.h 2011-09-28 15:37:57.530973271 +0200
12
+++ qt4-x11-4.7.4/src/declarative/accessible/qdeclarativeaccessible_p.h 2011-09-28 15:38:08.707028685 +0200
14
~QDeclarativeAccessibleAttached();
16
Role role() const { return (Role)m_role; }
17
- void setRole(Role role) { m_role = (char)role; }
18
+ void setRole(Role role)
20
+ m_role = (char)role;
22
+ // There is no way to signify role changes at the moment.
23
+ // QAccessible::updateAccessibility(parent(), 0, QAccessible::);
26
QString name() const { return m_name; }
27
- void setName(const QString &name) { m_name = name; }
28
+ void setName(const QString &name)
32
+ QAccessible::updateAccessibility(parent(), 0, QAccessible::NameChanged);
35
QString description() const { return m_description; }
36
- void setDescription(const QString &description) { m_description = description; }
37
+ void setDescription(const QString &description)
39
+ m_description = description;
40
+ emit descriptionChanged();
41
+ QAccessible::updateAccessibility(parent(), 0, QAccessible::DescriptionChanged);
44
QDeclarativeItem *item() const {
45
return static_cast<QDeclarativeItem*>(parent());