Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/linuxaccessibility/bridge.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||||||||
2 | ** | - | ||||||||||||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||||||||
4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||||||||
5 | ** | - | ||||||||||||
6 | ** This file is part of the QtGui module of the Qt Toolkit. | - | ||||||||||||
7 | ** | - | ||||||||||||
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||||||||
9 | ** Commercial License Usage | - | ||||||||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||||||||
15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||||||||
16 | ** | - | ||||||||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||
19 | ** General Public License version 3 as published by the Free Software | - | ||||||||||||
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||||||||
21 | ** packaging of this file. Please review the following information to | - | ||||||||||||
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||||||||
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||||||||
24 | ** | - | ||||||||||||
25 | ** GNU General Public License Usage | - | ||||||||||||
26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||||||||
27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||||||||
28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||||||||
29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||||||||
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||||||||
31 | ** included in the packaging of this file. Please review the following | - | ||||||||||||
32 | ** information to ensure the GNU General Public License requirements will | - | ||||||||||||
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||||||||
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||||||||
35 | ** | - | ||||||||||||
36 | ** $QT_END_LICENSE$ | - | ||||||||||||
37 | ** | - | ||||||||||||
38 | ****************************************************************************/ | - | ||||||||||||
39 | - | |||||||||||||
40 | - | |||||||||||||
41 | #include "bridge_p.h" | - | ||||||||||||
42 | - | |||||||||||||
43 | #include <atspi/atspi-constants.h> | - | ||||||||||||
44 | #include <qstring.h> | - | ||||||||||||
45 | - | |||||||||||||
46 | #include "atspiadaptor_p.h" | - | ||||||||||||
47 | - | |||||||||||||
48 | #include "cache_p.h" | - | ||||||||||||
49 | #include "constant_mappings_p.h" | - | ||||||||||||
50 | #include "dbusconnection_p.h" | - | ||||||||||||
51 | #include "struct_marshallers_p.h" | - | ||||||||||||
52 | - | |||||||||||||
53 | #ifndef QT_NO_ACCESSIBILITY | - | ||||||||||||
54 | #include "deviceeventcontroller_adaptor.h" | - | ||||||||||||
55 | - | |||||||||||||
56 | QT_BEGIN_NAMESPACE | - | ||||||||||||
57 | - | |||||||||||||
58 | /*! | - | ||||||||||||
59 | \class QSpiAccessibleBridge | - | ||||||||||||
60 | \internal | - | ||||||||||||
61 | */ | - | ||||||||||||
62 | - | |||||||||||||
63 | QSpiAccessibleBridge::QSpiAccessibleBridge() | - | ||||||||||||
64 | : cache(0), dec(0), dbusAdaptor(0) | - | ||||||||||||
65 | { | - | ||||||||||||
66 | dbusConnection = new DBusConnection(); | - | ||||||||||||
67 | connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool))); | - | ||||||||||||
68 | } executed 180 times by 128 tests: end of block Executed by:
| 180 | ||||||||||||
69 | - | |||||||||||||
70 | void QSpiAccessibleBridge::enabledChanged(bool enabled) | - | ||||||||||||
71 | { | - | ||||||||||||
72 | setActive(enabled); | - | ||||||||||||
73 | updateStatus(); | - | ||||||||||||
74 | } never executed: end of block | 0 | ||||||||||||
75 | - | |||||||||||||
76 | QSpiAccessibleBridge::~QSpiAccessibleBridge() | - | ||||||||||||
77 | { | - | ||||||||||||
78 | delete dbusConnection; | - | ||||||||||||
79 | } executed 178 times by 129 tests: // Qt currently doesn't delete plugins.end of block Executed by:
executed 178 times by 129 tests: end of block Executed by:
| 178 | ||||||||||||
80 | - | |||||||||||||
81 | QDBusConnection QSpiAccessibleBridge::dBusConnection() const | - | ||||||||||||
82 | { | - | ||||||||||||
83 | return dbusConnection->connection(); never executed: return dbusConnection->connection(); | 0 | ||||||||||||
84 | } | - | ||||||||||||
85 | - | |||||||||||||
86 | void QSpiAccessibleBridge::updateStatus() | - | ||||||||||||
87 | { | - | ||||||||||||
88 | // create the adaptor to handle everything if we are in enabled state | - | ||||||||||||
89 | if (!dbusAdaptor && isActive()) {
| 0 | ||||||||||||
90 | qSpiInitializeStructTypes(); | - | ||||||||||||
91 | initializeConstantMappings(); | - | ||||||||||||
92 | - | |||||||||||||
93 | cache = new QSpiDBusCache(dbusConnection->connection(), this); | - | ||||||||||||
94 | dec = new DeviceEventControllerAdaptor(this); | - | ||||||||||||
95 | - | |||||||||||||
96 | dbusConnection->connection().registerObject(QLatin1String(ATSPI_DBUS_PATH_DEC), this, QDBusConnection::ExportAdaptors); | - | ||||||||||||
97 | - | |||||||||||||
98 | dbusAdaptor = new AtSpiAdaptor(dbusConnection, this); | - | ||||||||||||
99 | dbusConnection->connection().registerVirtualObject(QLatin1String(QSPI_OBJECT_PATH_ACCESSIBLE), dbusAdaptor, QDBusConnection::SubPath); | - | ||||||||||||
100 | dbusAdaptor->registerApplication(); | - | ||||||||||||
101 | } never executed: end of block | 0 | ||||||||||||
102 | } never executed: end of block | 0 | ||||||||||||
103 | - | |||||||||||||
104 | void QSpiAccessibleBridge::notifyAccessibilityUpdate(QAccessibleEvent *event) | - | ||||||||||||
105 | { | - | ||||||||||||
106 | if (!dbusAdaptor)
| 0-114763 | ||||||||||||
107 | return; executed 114763 times by 125 tests: return; Executed by:
| 114763 | ||||||||||||
108 | if (isActive() && event->accessibleInterface())
| 0 | ||||||||||||
109 | dbusAdaptor->notify(event); never executed: dbusAdaptor->notify(event); | 0 | ||||||||||||
110 | } never executed: end of block | 0 | ||||||||||||
111 | - | |||||||||||||
112 | struct RoleMapping { | - | ||||||||||||
113 | QAccessible::Role role; | - | ||||||||||||
114 | AtspiRole spiRole; | - | ||||||||||||
115 | const char *name; | - | ||||||||||||
116 | }; | - | ||||||||||||
117 | - | |||||||||||||
118 | static RoleMapping map[] = { | - | ||||||||||||
119 | //: Role of an accessible object - the object is in an invalid state or could not be constructed | - | ||||||||||||
120 | { QAccessible::NoRole, ATSPI_ROLE_INVALID, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "invalid role") }, | - | ||||||||||||
121 | //: Role of an accessible object | - | ||||||||||||
122 | { QAccessible::TitleBar, ATSPI_ROLE_TEXT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "title bar") }, | - | ||||||||||||
123 | //: Role of an accessible object | - | ||||||||||||
124 | { QAccessible::MenuBar, ATSPI_ROLE_MENU_BAR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "menu bar") }, | - | ||||||||||||
125 | //: Role of an accessible object | - | ||||||||||||
126 | { QAccessible::ScrollBar, ATSPI_ROLE_SCROLL_BAR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "scroll bar") }, | - | ||||||||||||
127 | //: Role of an accessible object - the grip is usually used for resizing another object | - | ||||||||||||
128 | { QAccessible::Grip, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "grip") }, | - | ||||||||||||
129 | //: Role of an accessible object | - | ||||||||||||
130 | { QAccessible::Sound, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "sound") }, | - | ||||||||||||
131 | //: Role of an accessible object | - | ||||||||||||
132 | { QAccessible::Cursor, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "cursor") }, | - | ||||||||||||
133 | //: Role of an accessible object | - | ||||||||||||
134 | { QAccessible::Caret, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "text caret") }, | - | ||||||||||||
135 | //: Role of an accessible object | - | ||||||||||||
136 | { QAccessible::AlertMessage, ATSPI_ROLE_ALERT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "alert message") }, | - | ||||||||||||
137 | //: Role of an accessible object: a window with frame and title | - | ||||||||||||
138 | { QAccessible::Window, ATSPI_ROLE_FRAME, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "frame") }, | - | ||||||||||||
139 | //: Role of an accessible object | - | ||||||||||||
140 | { QAccessible::Client, ATSPI_ROLE_FILLER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "filler") }, | - | ||||||||||||
141 | //: Role of an accessible object | - | ||||||||||||
142 | { QAccessible::PopupMenu, ATSPI_ROLE_POPUP_MENU, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "popup menu") }, | - | ||||||||||||
143 | //: Role of an accessible object | - | ||||||||||||
144 | { QAccessible::MenuItem, ATSPI_ROLE_MENU_ITEM, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "menu item") }, | - | ||||||||||||
145 | //: Role of an accessible object | - | ||||||||||||
146 | { QAccessible::ToolTip, ATSPI_ROLE_TOOL_TIP, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "tool tip") }, | - | ||||||||||||
147 | //: Role of an accessible object | - | ||||||||||||
148 | { QAccessible::Application, ATSPI_ROLE_APPLICATION, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "application") }, | - | ||||||||||||
149 | //: Role of an accessible object | - | ||||||||||||
150 | { QAccessible::Document, ATSPI_ROLE_DOCUMENT_FRAME, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "document") }, | - | ||||||||||||
151 | //: Role of an accessible object | - | ||||||||||||
152 | { QAccessible::Pane, ATSPI_ROLE_PANEL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "panel") }, | - | ||||||||||||
153 | //: Role of an accessible object | - | ||||||||||||
154 | { QAccessible::Chart, ATSPI_ROLE_CHART, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "chart") }, | - | ||||||||||||
155 | //: Role of an accessible object | - | ||||||||||||
156 | { QAccessible::Dialog, ATSPI_ROLE_DIALOG, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "dialog") }, | - | ||||||||||||
157 | //: Role of an accessible object | - | ||||||||||||
158 | { QAccessible::Border, ATSPI_ROLE_FRAME, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "frame") }, | - | ||||||||||||
159 | //: Role of an accessible object | - | ||||||||||||
160 | { QAccessible::Grouping, ATSPI_ROLE_PANEL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "panel") }, | - | ||||||||||||
161 | //: Role of an accessible object | - | ||||||||||||
162 | { QAccessible::Separator, ATSPI_ROLE_SEPARATOR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "separator") }, | - | ||||||||||||
163 | //: Role of an accessible object | - | ||||||||||||
164 | { QAccessible::ToolBar, ATSPI_ROLE_TOOL_BAR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "tool bar") }, | - | ||||||||||||
165 | //: Role of an accessible object | - | ||||||||||||
166 | { QAccessible::StatusBar, ATSPI_ROLE_STATUS_BAR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "status bar") }, | - | ||||||||||||
167 | //: Role of an accessible object | - | ||||||||||||
168 | { QAccessible::Table, ATSPI_ROLE_TABLE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "table") }, | - | ||||||||||||
169 | //: Role of an accessible object - part of a table | - | ||||||||||||
170 | { QAccessible::ColumnHeader, ATSPI_ROLE_TABLE_COLUMN_HEADER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "column header") }, | - | ||||||||||||
171 | //: Role of an accessible object - part of a table | - | ||||||||||||
172 | { QAccessible::RowHeader, ATSPI_ROLE_TABLE_ROW_HEADER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "row header") }, | - | ||||||||||||
173 | //: Role of an accessible object - part of a table | - | ||||||||||||
174 | { QAccessible::Column, ATSPI_ROLE_TABLE_CELL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "column") }, | - | ||||||||||||
175 | //: Role of an accessible object - part of a table | - | ||||||||||||
176 | { QAccessible::Row, ATSPI_ROLE_TABLE_ROW, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "row") }, | - | ||||||||||||
177 | //: Role of an accessible object - part of a table | - | ||||||||||||
178 | { QAccessible::Cell, ATSPI_ROLE_TABLE_CELL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "cell") }, | - | ||||||||||||
179 | //: Role of an accessible object | - | ||||||||||||
180 | { QAccessible::Link, ATSPI_ROLE_LINK, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "link") }, | - | ||||||||||||
181 | //: Role of an accessible object | - | ||||||||||||
182 | { QAccessible::HelpBalloon, ATSPI_ROLE_DIALOG, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "help balloon") }, | - | ||||||||||||
183 | //: Role of an accessible object - a helper dialog | - | ||||||||||||
184 | { QAccessible::Assistant, ATSPI_ROLE_DIALOG, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "assistant") }, | - | ||||||||||||
185 | //: Role of an accessible object | - | ||||||||||||
186 | { QAccessible::List, ATSPI_ROLE_LIST, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "list") }, | - | ||||||||||||
187 | //: Role of an accessible object | - | ||||||||||||
188 | { QAccessible::ListItem, ATSPI_ROLE_LIST_ITEM, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "list item") }, | - | ||||||||||||
189 | //: Role of an accessible object | - | ||||||||||||
190 | { QAccessible::Tree, ATSPI_ROLE_TREE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "tree") }, | - | ||||||||||||
191 | //: Role of an accessible object | - | ||||||||||||
192 | { QAccessible::TreeItem, ATSPI_ROLE_TABLE_CELL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "tree item") }, | - | ||||||||||||
193 | //: Role of an accessible object | - | ||||||||||||
194 | { QAccessible::PageTab, ATSPI_ROLE_PAGE_TAB, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "page tab") }, | - | ||||||||||||
195 | //: Role of an accessible object | - | ||||||||||||
196 | { QAccessible::PropertyPage, ATSPI_ROLE_PAGE_TAB, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "property page") }, | - | ||||||||||||
197 | //: Role of an accessible object | - | ||||||||||||
198 | { QAccessible::Indicator, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "indicator") }, | - | ||||||||||||
199 | //: Role of an accessible object | - | ||||||||||||
200 | { QAccessible::Graphic, ATSPI_ROLE_IMAGE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "graphic") }, | - | ||||||||||||
201 | //: Role of an accessible object | - | ||||||||||||
202 | { QAccessible::StaticText, ATSPI_ROLE_LABEL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "label") }, | - | ||||||||||||
203 | //: Role of an accessible object | - | ||||||||||||
204 | { QAccessible::EditableText, ATSPI_ROLE_TEXT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "text") }, | - | ||||||||||||
205 | //: Role of an accessible object | - | ||||||||||||
206 | { QAccessible::PushButton, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "push button") }, | - | ||||||||||||
207 | //: Role of an accessible object | - | ||||||||||||
208 | { QAccessible::CheckBox, ATSPI_ROLE_CHECK_BOX, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "check box") }, | - | ||||||||||||
209 | //: Role of an accessible object | - | ||||||||||||
210 | { QAccessible::RadioButton, ATSPI_ROLE_RADIO_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "radio button") }, | - | ||||||||||||
211 | //: Role of an accessible object | - | ||||||||||||
212 | { QAccessible::ComboBox, ATSPI_ROLE_COMBO_BOX, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "combo box") }, | - | ||||||||||||
213 | //: Role of an accessible object | - | ||||||||||||
214 | { QAccessible::ProgressBar, ATSPI_ROLE_PROGRESS_BAR, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "progress bar") }, | - | ||||||||||||
215 | //: Role of an accessible object | - | ||||||||||||
216 | { QAccessible::Dial, ATSPI_ROLE_DIAL, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "dial") }, | - | ||||||||||||
217 | //: Role of an accessible object | - | ||||||||||||
218 | { QAccessible::HotkeyField, ATSPI_ROLE_TEXT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "hotkey field") }, | - | ||||||||||||
219 | //: Role of an accessible object | - | ||||||||||||
220 | { QAccessible::Slider, ATSPI_ROLE_SLIDER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "slider") }, | - | ||||||||||||
221 | //: Role of an accessible object | - | ||||||||||||
222 | { QAccessible::SpinBox, ATSPI_ROLE_SPIN_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "spin box") }, | - | ||||||||||||
223 | //: Role of an accessible object | - | ||||||||||||
224 | { QAccessible::Canvas, ATSPI_ROLE_CANVAS, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "canvas") }, | - | ||||||||||||
225 | //: Role of an accessible object | - | ||||||||||||
226 | { QAccessible::Animation, ATSPI_ROLE_ANIMATION, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "animation") }, | - | ||||||||||||
227 | //: Role of an accessible object | - | ||||||||||||
228 | { QAccessible::Equation, ATSPI_ROLE_TEXT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "equation") }, | - | ||||||||||||
229 | //: Role of an accessible object | - | ||||||||||||
230 | { QAccessible::ButtonDropDown, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button with drop down") }, | - | ||||||||||||
231 | //: Role of an accessible object | - | ||||||||||||
232 | { QAccessible::ButtonMenu, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button menu") }, | - | ||||||||||||
233 | //: Role of an accessible object - a button that expands a grid. | - | ||||||||||||
234 | { QAccessible::ButtonDropGrid, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button with drop down grid") }, | - | ||||||||||||
235 | //: Role of an accessible object - blank space between other objects. | - | ||||||||||||
236 | { QAccessible::Whitespace, ATSPI_ROLE_FILLER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "space") }, | - | ||||||||||||
237 | //: Role of an accessible object | - | ||||||||||||
238 | { QAccessible::PageTabList, ATSPI_ROLE_PAGE_TAB_LIST, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "page tab list") }, | - | ||||||||||||
239 | //: Role of an accessible object | - | ||||||||||||
240 | { QAccessible::Clock, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "clock") }, | - | ||||||||||||
241 | //: Role of an accessible object | - | ||||||||||||
242 | { QAccessible::Splitter, ATSPI_ROLE_SPLIT_PANE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "splitter") }, | - | ||||||||||||
243 | //: Role of an accessible object | - | ||||||||||||
244 | { QAccessible::LayeredPane, ATSPI_ROLE_LAYERED_PANE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "layered pane") }, | - | ||||||||||||
245 | //: Role of an accessible object | - | ||||||||||||
246 | { QAccessible::WebDocument, ATSPI_ROLE_DOCUMENT_WEB, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "web document") }, | - | ||||||||||||
247 | //: Role of an accessible object | - | ||||||||||||
248 | { QAccessible::Paragraph, ATSPI_ROLE_PARAGRAPH, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "paragraph") }, | - | ||||||||||||
249 | //: Role of an accessible object | - | ||||||||||||
250 | { QAccessible::Section, ATSPI_ROLE_SECTION, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "section") }, | - | ||||||||||||
251 | //: Role of an accessible object | - | ||||||||||||
252 | { QAccessible::ColorChooser, ATSPI_ROLE_COLOR_CHOOSER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "color chooser") }, | - | ||||||||||||
253 | //: Role of an accessible object | - | ||||||||||||
254 | { QAccessible::Footer, ATSPI_ROLE_FOOTER, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "footer") }, | - | ||||||||||||
255 | //: Role of an accessible object | - | ||||||||||||
256 | { QAccessible::Form, ATSPI_ROLE_FORM, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "form") }, | - | ||||||||||||
257 | //: Role of an accessible object | - | ||||||||||||
258 | { QAccessible::Heading, ATSPI_ROLE_HEADING, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "heading") }, | - | ||||||||||||
259 | //: Role of an accessible object | - | ||||||||||||
260 | { QAccessible::Note, ATSPI_ROLE_COMMENT, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "note") }, | - | ||||||||||||
261 | //: Role of an accessible object | - | ||||||||||||
262 | { QAccessible::ComplementaryContent, ATSPI_ROLE_SECTION, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "complementary content") }, | - | ||||||||||||
263 | //: Role of an accessible object | - | ||||||||||||
264 | { QAccessible::UserRole, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "unknown") } | - | ||||||||||||
265 | }; | - | ||||||||||||
266 | - | |||||||||||||
267 | void QSpiAccessibleBridge::initializeConstantMappings() | - | ||||||||||||
268 | { | - | ||||||||||||
269 | for (uint i = 0; i < sizeof(map) / sizeof(RoleMapping); ++i)
| 0 | ||||||||||||
270 | qSpiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1String(map[i].name), tr(map[i].name))); never executed: qSpiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1String(map[i].name), tr(map[i].name))); | 0 | ||||||||||||
271 | } never executed: end of block | 0 | ||||||||||||
272 | - | |||||||||||||
273 | QT_END_NAMESPACE | - | ||||||||||||
274 | #endif //QT_NO_ACCESSIBILITY | - | ||||||||||||
Source code | Switch to Preprocessed file |