OpenCoverage

atspiadaptor.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8static bool isDebugging = false;-
9-
10-
11AtSpiAdaptor::AtSpiAdaptor(DBusConnection *connection, QObject *parent)-
12 : QDBusVirtualObject(parent), m_dbus(connection)-
13 , sendFocus(0)-
14 , sendObject(0)-
15 , sendObject_active_descendant_changed(0)-
16 , sendObject_attributes_changed(0)-
17 , sendObject_bounds_changed(0)-
18 , sendObject_children_changed(0)-
19-
20-
21 , sendObject_column_deleted(0)-
22 , sendObject_column_inserted(0)-
23 , sendObject_column_reordered(0)-
24 , sendObject_link_selected(0)-
25 , sendObject_model_changed(0)-
26 , sendObject_property_change(0)-
27 , sendObject_property_change_accessible_description(0)-
28 , sendObject_property_change_accessible_name(0)-
29 , sendObject_property_change_accessible_parent(0)-
30 , sendObject_property_change_accessible_role(0)-
31 , sendObject_property_change_accessible_table_caption(0)-
32 , sendObject_property_change_accessible_table_column_description(0)-
33 , sendObject_property_change_accessible_table_column_header(0)-
34 , sendObject_property_change_accessible_table_row_description(0)-
35 , sendObject_property_change_accessible_table_row_header(0)-
36 , sendObject_property_change_accessible_table_summary(0)-
37 , sendObject_property_change_accessible_value(0)-
38 , sendObject_row_deleted(0)-
39 , sendObject_row_inserted(0)-
40 , sendObject_row_reordered(0)-
41 , sendObject_selection_changed(0)-
42 , sendObject_state_changed(0)-
43 , sendObject_text_attributes_changed(0)-
44 , sendObject_text_bounds_changed(0)-
45 , sendObject_text_caret_moved(0)-
46 , sendObject_text_changed(0)-
47-
48-
49 , sendObject_text_selection_changed(0)-
50 , sendObject_value_changed(0)-
51 , sendObject_visible_data_changed(0)-
52 , sendWindow(0)-
53 , sendWindow_activate(0)-
54 , sendWindow_close(0)-
55 , sendWindow_create(0)-
56 , sendWindow_deactivate(0)-
57-
58-
59 , sendWindow_lower(0)-
60 , sendWindow_maximize(0)-
61 , sendWindow_minimize(0)-
62 , sendWindow_move(0)-
63 , sendWindow_raise(0)-
64 , sendWindow_reparent(0)-
65 , sendWindow_resize(0)-
66 , sendWindow_restore(0)-
67 , sendWindow_restyle(0)-
68 , sendWindow_shade(0)-
69 , sendWindow_unshade(0)-
70{-
71 ::isDebugging = qEnvironmentVariableIsSet("QT_DEBUG_ACCESSIBILITY");-
72-
73 m_applicationAdaptor = new QSpiApplicationAdaptor(m_dbus->connection(), this);-
74 connect(m_applicationAdaptor, qFlagLocation("2""windowActivated(QObject*,bool)" "\0" __FILE__ ":" "134"), this, qFlagLocation("1""windowActivated(QObject*,bool)" "\0" __FILE__ ":" "134"));-
75-
76 updateEventListeners();-
77 bool success = m_dbus->connection().connect(QLatin1String("org.a11y.atspi.Registry"), QLatin1String("/org/a11y/atspi/registry"),-
78 QLatin1String("org.a11y.atspi.Registry"), QLatin1String("EventListenerRegistered"), this,-
79 qFlagLocation("1""eventListenerRegistered(QString,QString)" "\0" __FILE__ ":" "139"));-
80 success = success
successDescription
TRUEnever evaluated
FALSEnever evaluated
&& m_dbus->connection().connect(QLatin1String("org.a11y.atspi.Registry"), QLatin1String("/org/a11y/atspi/registry"),
m_dbus->connec...__ ":" "142"))Description
TRUEnever evaluated
FALSEnever evaluated
0
81 QLatin1String("org.a11y.atspi.Registry"), QLatin1String("EventListenerDeregistered"), this,
m_dbus->connec...__ ":" "142"))Description
TRUEnever evaluated
FALSEnever evaluated
0
82 qFlagLocation("1""eventListenerDeregistered(QString,QString)" "\0" __FILE__ ":" "142"))
m_dbus->connec...__ ":" "142"))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
83-
84-
85-
86}
never executed: end of block
0
87-
88AtSpiAdaptor::~AtSpiAdaptor()-
89{-
90}-
91-
92-
93-
94-
95QString AtSpiAdaptor::introspect(const QString &path) const-
96{-
97 static const QLatin1String accessibleIntrospection(-
98 " <interface name=\"org.a11y.atspi.Accessible\">\n"-
99 " <property access=\"read\" type=\"s\" name=\"Name\"/>\n"-
100 " <property access=\"read\" type=\"s\" name=\"Description\"/>\n"-
101 " <property access=\"read\" type=\"(so)\" name=\"Parent\">\n"-
102 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"-
103 " </property>\n"-
104 " <property access=\"read\" type=\"i\" name=\"ChildCount\"/>\n"-
105 " <method name=\"GetChildAtIndex\">\n"-
106 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
107 " <arg direction=\"out\" type=\"(so)\"/>\n"-
108 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
109 " </method>\n"-
110 " <method name=\"GetChildren\">\n"-
111 " <arg direction=\"out\" type=\"a(so)\"/>\n"-
112 " <annotation value=\"QSpiObjectReferenceArray\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
113 " </method>\n"-
114 " <method name=\"GetIndexInParent\">\n"-
115 " <arg direction=\"out\" type=\"i\"/>\n"-
116 " </method>\n"-
117 " <method name=\"GetRelationSet\">\n"-
118 " <arg direction=\"out\" type=\"a(ua(so))\"/>\n"-
119 " <annotation value=\"QSpiRelationArray\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
120 " </method>\n"-
121 " <method name=\"GetRole\">\n"-
122 " <arg direction=\"out\" type=\"u\"/>\n"-
123 " </method>\n"-
124 " <method name=\"GetRoleName\">\n"-
125 " <arg direction=\"out\" type=\"s\"/>\n"-
126 " </method>\n"-
127 " <method name=\"GetLocalizedRoleName\">\n"-
128 " <arg direction=\"out\" type=\"s\"/>\n"-
129 " </method>\n"-
130 " <method name=\"GetState\">\n"-
131 " <arg direction=\"out\" type=\"au\"/>\n"-
132 " <annotation value=\"QSpiUIntList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
133 " </method>\n"-
134 " <method name=\"GetAttributes\">\n"-
135 " <arg direction=\"out\" type=\"a{ss}\"/>\n"-
136 " <annotation value=\"QSpiAttributeSet\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
137 " </method>\n"-
138 " <method name=\"GetApplication\">\n"-
139 " <arg direction=\"out\" type=\"(so)\"/>\n"-
140 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
141 " </method>\n"-
142 " </interface>\n"-
143 );-
144-
145 static const QLatin1String actionIntrospection(-
146 " <interface name=\"org.a11y.atspi.Action\">\n"-
147 " <property access=\"read\" type=\"i\" name=\"NActions\"/>\n"-
148 " <method name=\"GetDescription\">\n"-
149 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
150 " <arg direction=\"out\" type=\"s\"/>\n"-
151 " </method>\n"-
152 " <method name=\"GetName\">\n"-
153 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
154 " <arg direction=\"out\" type=\"s\"/>\n"-
155 " </method>\n"-
156 " <method name=\"GetKeyBinding\">\n"-
157 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
158 " <arg direction=\"out\" type=\"s\"/>\n"-
159 " </method>\n"-
160 " <method name=\"GetActions\">\n"-
161 " <arg direction=\"out\" type=\"a(sss)\" name=\"index\"/>\n"-
162 " <annotation value=\"QSpiActionArray\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
163 " </method>\n"-
164 " <method name=\"DoAction\">\n"-
165 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
166 " <arg direction=\"out\" type=\"b\"/>\n"-
167 " </method>\n"-
168 " </interface>\n"-
169 );-
170-
171 static const QLatin1String applicationIntrospection(-
172 " <interface name=\"org.a11y.atspi.Application\">\n"-
173 " <property access=\"read\" type=\"s\" name=\"ToolkitName\"/>\n"-
174 " <property access=\"read\" type=\"s\" name=\"Version\"/>\n"-
175 " <property access=\"readwrite\" type=\"i\" name=\"Id\"/>\n"-
176 " <method name=\"GetLocale\">\n"-
177 " <arg direction=\"in\" type=\"u\" name=\"lctype\"/>\n"-
178 " <arg direction=\"out\" type=\"s\"/>\n"-
179 " </method>\n"-
180 " <method name=\"GetApplicationBusAddress\">\n"-
181 " <arg direction=\"out\" type=\"s\" name=\"address\"/>\n"-
182 " </method>\n"-
183 " </interface>\n"-
184 );-
185-
186 static const QLatin1String componentIntrospection(-
187 " <interface name=\"org.a11y.atspi.Component\">\n"-
188 " <method name=\"Contains\">\n"-
189 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
190 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
191 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
192 " <arg direction=\"out\" type=\"b\"/>\n"-
193 " </method>\n"-
194 " <method name=\"GetAccessibleAtPoint\">\n"-
195 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
196 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
197 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
198 " <arg direction=\"out\" type=\"(so)\"/>\n"-
199 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
200 " </method>\n"-
201 " <method name=\"GetExtents\">\n"-
202 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
203 " <arg direction=\"out\" type=\"(iiii)\"/>\n"-
204 " <annotation value=\"QSpiRect\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
205 " </method>\n"-
206 " <method name=\"GetPosition\">\n"-
207 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
208 " <arg direction=\"out\" type=\"i\" name=\"x\"/>\n"-
209 " <arg direction=\"out\" type=\"i\" name=\"y\"/>\n"-
210 " </method>\n"-
211 " <method name=\"GetSize\">\n"-
212 " <arg direction=\"out\" type=\"i\" name=\"width\"/>\n"-
213 " <arg direction=\"out\" type=\"i\" name=\"height\"/>\n"-
214 " </method>\n"-
215 " <method name=\"GetLayer\">\n"-
216 " <arg direction=\"out\" type=\"u\"/>\n"-
217 " </method>\n"-
218 " <method name=\"GetMDIZOrder\">\n"-
219 " <arg direction=\"out\" type=\"n\"/>\n"-
220 " </method>\n"-
221 " <method name=\"GrabFocus\">\n"-
222 " <arg direction=\"out\" type=\"b\"/>\n"-
223 " </method>\n"-
224 " <method name=\"GetAlpha\">\n"-
225 " <arg direction=\"out\" type=\"d\"/>\n"-
226 " </method>\n"-
227 " <method name=\"SetExtents\">\n"-
228 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
229 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
230 " <arg direction=\"in\" type=\"i\" name=\"width\"/>\n"-
231 " <arg direction=\"in\" type=\"i\" name=\"height\"/>\n"-
232 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
233 " <arg direction=\"out\" type=\"b\"/>\n"-
234 " </method>\n"-
235 " <method name=\"SetPosition\">\n"-
236 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
237 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
238 " <arg direction=\"in\" type=\"u\" name=\"coord_type\"/>\n"-
239 " <arg direction=\"out\" type=\"b\"/>\n"-
240 " </method>\n"-
241 " <method name=\"SetSize\">\n"-
242 " <arg direction=\"in\" type=\"i\" name=\"width\"/>\n"-
243 " <arg direction=\"in\" type=\"i\" name=\"height\"/>\n"-
244 " <arg direction=\"out\" type=\"b\"/>\n"-
245 " </method>\n"-
246 " </interface>\n"-
247 );-
248-
249 static const QLatin1String editableTextIntrospection(-
250 " <interface name=\"org.a11y.atspi.EditableText\">\n"-
251 " <method name=\"SetTextContents\">\n"-
252 " <arg direction=\"in\" type=\"s\" name=\"newContents\"/>\n"-
253 " <arg direction=\"out\" type=\"b\"/>\n"-
254 " </method>\n"-
255 " <method name=\"InsertText\">\n"-
256 " <arg direction=\"in\" type=\"i\" name=\"position\"/>\n"-
257 " <arg direction=\"in\" type=\"s\" name=\"text\"/>\n"-
258 " <arg direction=\"in\" type=\"i\" name=\"length\"/>\n"-
259 " <arg direction=\"out\" type=\"b\"/>\n"-
260 " </method>\n"-
261 " <method name=\"CopyText\">\n"-
262 " <arg direction=\"in\" type=\"i\" name=\"startPos\"/>\n"-
263 " <arg direction=\"in\" type=\"i\" name=\"endPos\"/>\n"-
264 " </method>\n"-
265 " <method name=\"CutText\">\n"-
266 " <arg direction=\"in\" type=\"i\" name=\"startPos\"/>\n"-
267 " <arg direction=\"in\" type=\"i\" name=\"endPos\"/>\n"-
268 " <arg direction=\"out\" type=\"b\"/>\n"-
269 " </method>\n"-
270 " <method name=\"DeleteText\">\n"-
271 " <arg direction=\"in\" type=\"i\" name=\"startPos\"/>\n"-
272 " <arg direction=\"in\" type=\"i\" name=\"endPos\"/>\n"-
273 " <arg direction=\"out\" type=\"b\"/>\n"-
274 " </method>\n"-
275 " <method name=\"PasteText\">\n"-
276 " <arg direction=\"in\" type=\"i\" name=\"position\"/>\n"-
277 " <arg direction=\"out\" type=\"b\"/>\n"-
278 " </method>\n"-
279 " </interface>\n"-
280 );-
281-
282 static const QLatin1String tableIntrospection(-
283 " <interface name=\"org.a11y.atspi.Table\">\n"-
284 " <property access=\"read\" type=\"i\" name=\"NRows\"/>\n"-
285 " <property access=\"read\" type=\"i\" name=\"NColumns\"/>\n"-
286 " <property access=\"read\" type=\"(so)\" name=\"Caption\">\n"-
287 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"-
288 " </property>\n"-
289 " <property access=\"read\" type=\"(so)\" name=\"Summary\">\n"-
290 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"-
291 " </property>\n"-
292 " <property access=\"read\" type=\"i\" name=\"NSelectedRows\"/>\n"-
293 " <property access=\"read\" type=\"i\" name=\"NSelectedColumns\"/>\n"-
294 " <method name=\"GetAccessibleAt\">\n"-
295 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
296 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
297 " <arg direction=\"out\" type=\"(so)\"/>\n"-
298 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
299 " </method>\n"-
300 " <method name=\"GetIndexAt\">\n"-
301 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
302 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
303 " <arg direction=\"out\" type=\"i\"/>\n"-
304 " </method>\n"-
305 " <method name=\"GetRowAtIndex\">\n"-
306 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
307 " <arg direction=\"out\" type=\"i\"/>\n"-
308 " </method>\n"-
309 " <method name=\"GetColumnAtIndex\">\n"-
310 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
311 " <arg direction=\"out\" type=\"i\"/>\n"-
312 " </method>\n"-
313 " <method name=\"GetRowDescription\">\n"-
314 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
315 " <arg direction=\"out\" type=\"s\"/>\n"-
316 " </method>\n"-
317 " <method name=\"GetColumnDescription\">\n"-
318 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
319 " <arg direction=\"out\" type=\"s\"/>\n"-
320 " </method>\n"-
321 " <method name=\"GetRowExtentAt\">\n"-
322 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
323 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
324 " <arg direction=\"out\" type=\"i\"/>\n"-
325 " </method>\n"-
326 " <method name=\"GetColumnExtentAt\">\n"-
327 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
328 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
329 " <arg direction=\"out\" type=\"i\"/>\n"-
330 " </method>\n"-
331 " <method name=\"GetRowHeader\">\n"-
332 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
333 " <arg direction=\"out\" type=\"(so)\"/>\n"-
334 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
335 " </method>\n"-
336 " <method name=\"GetColumnHeader\">\n"-
337 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
338 " <arg direction=\"out\" type=\"(so)\"/>\n"-
339 " <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
340 " </method>\n"-
341 " <method name=\"GetSelectedRows\">\n"-
342 " <arg direction=\"out\" type=\"ai\"/>\n"-
343 " <annotation value=\"QSpiIntList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
344 " </method>\n"-
345 " <method name=\"GetSelectedColumns\">\n"-
346 " <arg direction=\"out\" type=\"ai\"/>\n"-
347 " <annotation value=\"QSpiIntList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
348 " </method>\n"-
349 " <method name=\"IsRowSelected\">\n"-
350 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
351 " <arg direction=\"out\" type=\"b\"/>\n"-
352 " </method>\n"-
353 " <method name=\"IsColumnSelected\">\n"-
354 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
355 " <arg direction=\"out\" type=\"b\"/>\n"-
356 " </method>\n"-
357 " <method name=\"IsSelected\">\n"-
358 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
359 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
360 " <arg direction=\"out\" type=\"b\"/>\n"-
361 " </method>\n"-
362 " <method name=\"AddRowSelection\">\n"-
363 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
364 " <arg direction=\"out\" type=\"b\"/>\n"-
365 " </method>\n"-
366 " <method name=\"AddColumnSelection\">\n"-
367 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
368 " <arg direction=\"out\" type=\"b\"/>\n"-
369 " </method>\n"-
370 " <method name=\"RemoveRowSelection\">\n"-
371 " <arg direction=\"in\" type=\"i\" name=\"row\"/>\n"-
372 " <arg direction=\"out\" type=\"b\"/>\n"-
373 " </method>\n"-
374 " <method name=\"RemoveColumnSelection\">\n"-
375 " <arg direction=\"in\" type=\"i\" name=\"column\"/>\n"-
376 " <arg direction=\"out\" type=\"b\"/>\n"-
377 " </method>\n"-
378 " <method name=\"GetRowColumnExtentsAtIndex\">\n"-
379 " <arg direction=\"in\" type=\"i\" name=\"index\"/>\n"-
380 " <arg direction=\"out\" type=\"b\"/>\n"-
381 " <arg direction=\"out\" type=\"i\" name=\"row\"/>\n"-
382 " <arg direction=\"out\" type=\"i\" name=\"col\"/>\n"-
383 " <arg direction=\"out\" type=\"i\" name=\"row_extents\"/>\n"-
384 " <arg direction=\"out\" type=\"i\" name=\"col_extents\"/>\n"-
385 " <arg direction=\"out\" type=\"b\" name=\"is_selected\"/>\n"-
386 " </method>\n"-
387 " </interface>\n"-
388 );-
389-
390 static const QLatin1String textIntrospection(-
391 " <interface name=\"org.a11y.atspi.Text\">\n"-
392 " <property access=\"read\" type=\"i\" name=\"CharacterCount\"/>\n"-
393 " <property access=\"read\" type=\"i\" name=\"CaretOffset\"/>\n"-
394 " <method name=\"GetText\">\n"-
395 " <arg direction=\"in\" type=\"i\" name=\"startOffset\"/>\n"-
396 " <arg direction=\"in\" type=\"i\" name=\"endOffset\"/>\n"-
397 " <arg direction=\"out\" type=\"s\"/>\n"-
398 " </method>\n"-
399 " <method name=\"SetCaretOffset\">\n"-
400 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
401 " <arg direction=\"out\" type=\"b\"/>\n"-
402 " </method>\n"-
403 " <method name=\"GetTextBeforeOffset\">\n"-
404 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
405 " <arg direction=\"in\" type=\"u\" name=\"type\"/>\n"-
406 " <arg direction=\"out\" type=\"s\"/>\n"-
407 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
408 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
409 " </method>\n"-
410 " <method name=\"GetTextAtOffset\">\n"-
411 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
412 " <arg direction=\"in\" type=\"u\" name=\"type\"/>\n"-
413 " <arg direction=\"out\" type=\"s\"/>\n"-
414 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
415 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
416 " </method>\n"-
417 " <method name=\"GetTextAfterOffset\">\n"-
418 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
419 " <arg direction=\"in\" type=\"u\" name=\"type\"/>\n"-
420 " <arg direction=\"out\" type=\"s\"/>\n"-
421 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
422 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
423 " </method>\n"-
424 " <method name=\"GetCharacterAtOffset\">\n"-
425 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
426 " <arg direction=\"out\" type=\"i\"/>\n"-
427 " </method>\n"-
428 " <method name=\"GetAttributeValue\">\n"-
429 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
430 " <arg direction=\"in\" type=\"s\" name=\"attributeName\"/>\n"-
431 " <arg direction=\"out\" type=\"s\"/>\n"-
432 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
433 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
434 " <arg direction=\"out\" type=\"b\" name=\"defined\"/>\n"-
435 " </method>\n"-
436 " <method name=\"GetAttributes\">\n"-
437 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
438 " <arg direction=\"out\" type=\"a{ss}\"/>\n"-
439 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
440 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
441 " <annotation value=\"QSpiAttributeSet\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
442 " </method>\n"-
443 " <method name=\"GetDefaultAttributes\">\n"-
444 " <arg direction=\"out\" type=\"a{ss}\"/>\n"-
445 " <annotation value=\"QSpiAttributeSet\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
446 " </method>\n"-
447 " <method name=\"GetCharacterExtents\">\n"-
448 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
449 " <arg direction=\"out\" type=\"i\" name=\"x\"/>\n"-
450 " <arg direction=\"out\" type=\"i\" name=\"y\"/>\n"-
451 " <arg direction=\"out\" type=\"i\" name=\"width\"/>\n"-
452 " <arg direction=\"out\" type=\"i\" name=\"height\"/>\n"-
453 " <arg direction=\"in\" type=\"u\" name=\"coordType\"/>\n"-
454 " </method>\n"-
455 " <method name=\"GetOffsetAtPoint\">\n"-
456 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
457 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
458 " <arg direction=\"in\" type=\"u\" name=\"coordType\"/>\n"-
459 " <arg direction=\"out\" type=\"i\"/>\n"-
460 " </method>\n"-
461 " <method name=\"GetNSelections\">\n"-
462 " <arg direction=\"out\" type=\"i\"/>\n"-
463 " <method name=\"GetSelection\">\n"-
464 " <arg direction=\"in\" type=\"i\" name=\"selectionNum\"/>\n"-
465 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
466 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
467 " </method>\n"-
468 " <method name=\"AddSelection\">\n"-
469 " <arg direction=\"in\" type=\"i\" name=\"startOffset\"/>\n"-
470 " <arg direction=\"in\" type=\"i\" name=\"endOffset\"/>\n"-
471 " <arg direction=\"out\" type=\"b\"/>\n"-
472 " </method>\n"-
473 " <method name=\"RemoveSelection\">\n"-
474 " <arg direction=\"in\" type=\"i\" name=\"selectionNum\"/>\n"-
475 " <arg direction=\"out\" type=\"b\"/>\n"-
476 " </method>\n"-
477 " <method name=\"SetSelection\">\n"-
478 " <arg direction=\"in\" type=\"i\" name=\"selectionNum\"/>\n"-
479 " <arg direction=\"in\" type=\"i\" name=\"startOffset\"/>\n"-
480 " <arg direction=\"in\" type=\"i\" name=\"endOffset\"/>\n"-
481 " <arg direction=\"out\" type=\"b\"/>\n"-
482 " </method>\n"-
483 " <method name=\"GetRangeExtents\">\n"-
484 " <arg direction=\"in\" type=\"i\" name=\"startOffset\"/>\n"-
485 " <arg direction=\"in\" type=\"i\" name=\"endOffset\"/>\n"-
486 " <arg direction=\"out\" type=\"i\" name=\"x\"/>\n"-
487 " <arg direction=\"out\" type=\"i\" name=\"y\"/>\n"-
488 " <arg direction=\"out\" type=\"i\" name=\"width\"/>\n"-
489 " <arg direction=\"out\" type=\"i\" name=\"height\"/>\n"-
490 " <arg direction=\"in\" type=\"u\" name=\"coordType\"/>\n"-
491 " </method>\n"-
492 " <method name=\"GetBoundedRanges\">\n"-
493 " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"-
494 " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"-
495 " <arg direction=\"in\" type=\"i\" name=\"width\"/>\n"-
496 " <arg direction=\"in\" type=\"i\" name=\"height\"/>\n"-
497 " <arg direction=\"in\" type=\"u\" name=\"coordType\"/>\n"-
498 " <arg direction=\"in\" type=\"u\" name=\"xClipType\"/>\n"-
499 " <arg direction=\"in\" type=\"u\" name=\"yClipType\"/>\n"-
500 " <arg direction=\"out\" type=\"a(iisv)\"/>\n"-
501 " <annotation value=\"QSpiRangeList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
502 " </method>\n"-
503 " <method name=\"GetAttributeRun\">\n"-
504 " <arg direction=\"in\" type=\"i\" name=\"offset\"/>\n"-
505 " <arg direction=\"in\" type=\"b\" name=\"includeDefaults\"/>\n"-
506 " <arg direction=\"out\" type=\"a{ss}\"/>\n"-
507 " <arg direction=\"out\" type=\"i\" name=\"startOffset\"/>\n"-
508 " <arg direction=\"out\" type=\"i\" name=\"endOffset\"/>\n"-
509 " <annotation value=\"QSpiAttributeSet\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
510 " </method>\n"-
511 " <method name=\"GetDefaultAttributeSet\">\n"-
512 " <arg direction=\"out\" type=\"a{ss}\"/>\n"-
513 " <annotation value=\"QSpiAttributeSet\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"-
514 " </method>\n"-
515 " </interface>\n"-
516 );-
517-
518 static const QLatin1String valueIntrospection(-
519 " <interface name=\"org.a11y.atspi.Value\">\n"-
520 " <property access=\"read\" type=\"d\" name=\"MinimumValue\"/>\n"-
521 " <property access=\"read\" type=\"d\" name=\"MaximumValue\"/>\n"-
522 " <property access=\"read\" type=\"d\" name=\"MinimumIncrement\"/>\n"-
523 " <property access=\"readwrite\" type=\"d\" name=\"CurrentValue\"/>\n"-
524 " <method name=\"SetCurrentValue\">\n"-
525 " <arg direction=\"in\" type=\"d\" name=\"value\"/>\n"-
526 " </method>\n"-
527 " </interface>\n"-
528 );-
529-
530 QAccessibleInterface * interface = interfaceFromPath(path);-
531 if (!interface
!interfaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
532 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 592, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << path;
never executed: QMessageLogger(__FILE__, 592, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << path;
0
533 return
never executed: return QString();
QString();
never executed: return QString();
0
534 }-
535-
536 QStringList interfaces = accessibleInterfaces(interface);-
537-
538 QString xml;-
539 xml.append(accessibleIntrospection);-
540-
541 if (interfaces.contains(QLatin1String("org.a11y.atspi.Component"))
interfaces.con...i.Component"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
542 xml.append(componentIntrospection);
never executed: xml.append(componentIntrospection);
0
543 if (interfaces.contains(QLatin1String("org.a11y.atspi.Text"))
interfaces.con....atspi.Text"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
544 xml.append(textIntrospection);
never executed: xml.append(textIntrospection);
0
545 if (interfaces.contains(QLatin1String("org.a11y.atspi.EditableText"))
interfaces.con...ditableText"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
546 xml.append(editableTextIntrospection);
never executed: xml.append(editableTextIntrospection);
0
547 if (interfaces.contains(QLatin1String("org.a11y.atspi.Action"))
interfaces.con...tspi.Action"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
548 xml.append(actionIntrospection);
never executed: xml.append(actionIntrospection);
0
549 if (interfaces.contains(QLatin1String("org.a11y.atspi.Table"))
interfaces.con...atspi.Table"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
550 xml.append(tableIntrospection);
never executed: xml.append(tableIntrospection);
0
551 if (interfaces.contains(QLatin1String("org.a11y.atspi.Value"))
interfaces.con...atspi.Value"))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
552 xml.append(valueIntrospection);
never executed: xml.append(valueIntrospection);
0
553 if (path == QLatin1String("/org/a11y/atspi/accessible/" "root")
path == QLatin...ible/" "root")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
554 xml.append(applicationIntrospection);
never executed: xml.append(applicationIntrospection);
0
555-
556 return
never executed: return xml;
xml;
never executed: return xml;
0
557}-
558-
559void AtSpiAdaptor::setBitFlag(const QString &flag)-
560{-
561 ((!(flag.size())) ? qt_assert("flag.size()",__FILE__,621) : qt_noop());-
562-
563-
564 switch (flag.at(0).toLower().toLatin1()) {-
565 case
never executed: case 'o':
'o':
never executed: case 'o':
{
0
566 if (flag.size() <= 8
flag.size() <= 8Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
567 sendObject = 1;-
568 }
never executed: end of block
else {
0
569 QString right = flag.mid(7);-
570 if (false) {
dead code: { }
-
571 }
dead code: { }
else if (right.startsWith(QLatin1String("ActiveDescendantChanged"))
right.startsWi...dantChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
-
572 sendObject_active_descendant_changed = 1;-
573 }
never executed: end of block
else if (right.startsWith(QLatin1String("AttributesChanged"))
right.startsWi...utesChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
574 sendObject_attributes_changed = 1;-
575 }
never executed: end of block
else if (right.startsWith(QLatin1String("BoundsChanged"))
right.startsWi...undsChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
576 sendObject_bounds_changed = 1;-
577 }
never executed: end of block
else if (right.startsWith(QLatin1String("ChildrenChanged"))
right.startsWi...drenChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
578 sendObject_children_changed = 1;-
579 }
never executed: end of block
else if (right.startsWith(QLatin1String("ColumnDeleted"))
right.startsWi...lumnDeleted"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
580 sendObject_column_deleted = 1;-
581 }
never executed: end of block
else if (right.startsWith(QLatin1String("ColumnInserted"))
right.startsWi...umnInserted"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
582 sendObject_column_inserted = 1;-
583 }
never executed: end of block
else if (right.startsWith(QLatin1String("ColumnReordered"))
right.startsWi...mnReordered"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
584 sendObject_column_reordered = 1;-
585 }
never executed: end of block
else if (right.startsWith(QLatin1String("LinkSelected"))
right.startsWi...inkSelected"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
586 sendObject_link_selected = 1;-
587 }
never executed: end of block
else if (right.startsWith(QLatin1String("ModelChanged"))
right.startsWi...odelChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
588 sendObject_model_changed = 1;-
589 }
never executed: end of block
else if (right.startsWith(QLatin1String("PropertyChange"))
right.startsWi...pertyChange"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
590 if (right == QLatin1String("PropertyChange:AccessibleDescription")
right == QLati...eDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
591 sendObject_property_change_accessible_description = 1;-
592 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:AccessibleName")
right == QLati...cessibleName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
593 sendObject_property_change_accessible_name = 1;-
594 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:AccessibleParent")
right == QLati...ssibleParent")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
595 sendObject_property_change_accessible_parent = 1;-
596 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:AccessibleRole")
right == QLati...cessibleRole")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
597 sendObject_property_change_accessible_role = 1;-
598 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableCaption")
right == QLati...TableCaption")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
599 sendObject_property_change_accessible_table_caption = 1;-
600 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableColumnDescription")
right == QLati...nDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
601 sendObject_property_change_accessible_table_column_description = 1;-
602 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableColumnHeader")
right == QLati...ColumnHeader")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
603 sendObject_property_change_accessible_table_column_header = 1;-
604 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableRowDescription")
right == QLati...wDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
605 sendObject_property_change_accessible_table_row_description = 1;-
606 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableRowHeader")
right == QLati...bleRowHeader")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
607 sendObject_property_change_accessible_table_row_header = 1;-
608 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:TableSummary")
right == QLati...TableSummary")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
609 sendObject_property_change_accessible_table_summary = 1;-
610 }
never executed: end of block
else if (right == QLatin1String("PropertyChange:AccessibleValue")
right == QLati...essibleValue")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
611 sendObject_property_change_accessible_value = 1;-
612 }
never executed: end of block
else {
0
613 sendObject_property_change = 1;-
614 }
never executed: end of block
0
615 } else if (right.startsWith(QLatin1String("RowDeleted"))
right.startsWi..."RowDeleted"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
616 sendObject_row_deleted = 1;-
617 }
never executed: end of block
else if (right.startsWith(QLatin1String("RowInserted"))
right.startsWi...RowInserted"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
618 sendObject_row_inserted = 1;-
619 }
never executed: end of block
else if (right.startsWith(QLatin1String("RowReordered"))
right.startsWi...owReordered"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
620 sendObject_row_reordered = 1;-
621 }
never executed: end of block
else if (right.startsWith(QLatin1String("SelectionChanged"))
right.startsWi...tionChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
622 sendObject_selection_changed = 1;-
623 }
never executed: end of block
else if (right.startsWith(QLatin1String("StateChanged"))
right.startsWi...tateChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
624 sendObject_state_changed = 1;-
625 }
never executed: end of block
else if (right.startsWith(QLatin1String("TextAttributesChanged"))
right.startsWi...utesChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
626 sendObject_text_attributes_changed = 1;-
627 }
never executed: end of block
else if (right.startsWith(QLatin1String("TextBoundsChanged"))
right.startsWi...undsChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
628 sendObject_text_bounds_changed = 1;-
629 }
never executed: end of block
else if (right.startsWith(QLatin1String("TextCaretMoved"))
right.startsWi...tCaretMoved"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
630 sendObject_text_caret_moved = 1;-
631 }
never executed: end of block
else if (right.startsWith(QLatin1String("TextChanged"))
right.startsWi...TextChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
632 sendObject_text_changed = 1;-
633 }
never executed: end of block
else if (right.startsWith(QLatin1String("TextSelectionChanged"))
right.startsWi...tionChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
634 sendObject_text_selection_changed = 1;-
635 }
never executed: end of block
else if (right.startsWith(QLatin1String("ValueChanged"))
right.startsWi...alueChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
636 sendObject_value_changed = 1;-
637 }
never executed: end of block
else if (right.startsWith(QLatin1String("VisibleDataChanged"))
right.startsWi...DataChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
0
638 || right.startsWith(QLatin1String("VisibledataChanged"))
right.startsWi...dataChanged"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
639 sendObject_visible_data_changed = 1;-
640 }
never executed: end of block
else {
0
641 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 701, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
never executed: QMessageLogger(__FILE__, 701, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
0
642 }-
643 }-
644 break;
never executed: break;
0
645 }-
646 case
never executed: case 'w':
'w':
never executed: case 'w':
{
0
647 if (flag.size() <= 8
flag.size() <= 8Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
648 sendWindow = 1;-
649 }
never executed: end of block
else {
0
650 QString right = flag.mid(7);-
651 if (false) {
dead code: { }
-
652 }
dead code: { }
else if (right.startsWith(QLatin1String("Activate"))
right.startsWi...g("Activate"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
-
653 sendWindow_activate = 1;-
654 }
never executed: end of block
else if (right.startsWith(QLatin1String("Close"))
right.startsWi...ring("Close"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
655 sendWindow_close= 1;-
656 }
never executed: end of block
else if (right.startsWith(QLatin1String("Create"))
right.startsWi...ing("Create"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
657 sendWindow_create = 1;-
658 }
never executed: end of block
else if (right.startsWith(QLatin1String("Deactivate"))
right.startsWi..."Deactivate"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
659 sendWindow_deactivate = 1;-
660 }
never executed: end of block
else if (right.startsWith(QLatin1String("Lower"))
right.startsWi...ring("Lower"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
661 sendWindow_lower = 1;-
662 }
never executed: end of block
else if (right.startsWith(QLatin1String("Maximize"))
right.startsWi...g("Maximize"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
663 sendWindow_maximize = 1;-
664 }
never executed: end of block
else if (right.startsWith(QLatin1String("Minimize"))
right.startsWi...g("Minimize"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
665 sendWindow_minimize = 1;-
666 }
never executed: end of block
else if (right.startsWith(QLatin1String("Move"))
right.startsWi...tring("Move"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
667 sendWindow_move = 1;-
668 }
never executed: end of block
else if (right.startsWith(QLatin1String("Raise"))
right.startsWi...ring("Raise"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
669 sendWindow_raise = 1;-
670 }
never executed: end of block
else if (right.startsWith(QLatin1String("Reparent"))
right.startsWi...g("Reparent"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
671 sendWindow_reparent = 1;-
672 }
never executed: end of block
else if (right.startsWith(QLatin1String("Resize"))
right.startsWi...ing("Resize"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
673 sendWindow_resize = 1;-
674 }
never executed: end of block
else if (right.startsWith(QLatin1String("Restore"))
right.startsWi...ng("Restore"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
675 sendWindow_restore = 1;-
676 }
never executed: end of block
else if (right.startsWith(QLatin1String("Restyle"))
right.startsWi...ng("Restyle"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
677 sendWindow_restyle = 1;-
678 }
never executed: end of block
else if (right.startsWith(QLatin1String("Shade"))
right.startsWi...ring("Shade"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
679 sendWindow_shade = 1;-
680 }
never executed: end of block
else if (right.startsWith(QLatin1String("Unshade"))
right.startsWi...ng("Unshade"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
681 sendWindow_unshade = 1;-
682 }
never executed: end of block
else if (right.startsWith(QLatin1String("DesktopCreate"))
right.startsWi...sktopCreate"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
683-
684 }
never executed: end of block
else if (right.startsWith(QLatin1String("DesktopDestroy"))
right.startsWi...ktopDestroy"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
685-
686 }
never executed: end of block
else {
0
687 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 747, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
never executed: QMessageLogger(__FILE__, 747, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
0
688 }-
689 }-
690 break;
never executed: break;
0
691 }-
692 case
never executed: case 'f':
'f':
never executed: case 'f':
{
0
693 sendFocus = 1;-
694 break;
never executed: break;
0
695 }-
696 case
never executed: case 'd':
'd':
never executed: case 'd':
{
0
697 break;
never executed: break;
0
698 }-
699 case
never executed: case 't':
't':
never executed: case 't':
{
0
700 break;
never executed: break;
0
701 }-
702 case
never executed: case 'm':
'm':
never executed: case 'm':
{
0
703 break;
never executed: break;
0
704 }-
705 default
never executed: default:
:
never executed: default:
0
706 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 766, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
never executed: QMessageLogger(__FILE__, 766, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;
0
707 }-
708}-
709-
710-
711-
712-
713void AtSpiAdaptor::updateEventListeners()-
714{-
715 QDBusMessage m = QDBusMessage::createMethodCall(QLatin1String("org.a11y.atspi.Registry"),-
716 QLatin1String("/org/a11y/atspi/registry"),-
717 QLatin1String("org.a11y.atspi.Registry"), QLatin1String("GetRegisteredEvents"));-
718 QDBusReply<QSpiEventListenerArray> listenersReply = m_dbus->connection().call(m);-
719 if (listenersReply.isValid()
listenersReply.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
720 const QSpiEventListenerArray evList = listenersReply.value();-
721 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(evList)>::type> _container_((evList)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QSpiEventListener &ev = *_container_.i; _container_.control; _container_.control = 0) {-
722 setBitFlag(ev.eventName);-
723 }
never executed: end of block
0
724 m_applicationAdaptor->sendEvents(!evList.isEmpty());-
725 }
never executed: end of block
else {
0
726 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 786, __PRETTY_FUNCTION__).debug("Could not query active accessibility event listeners.");
never executed: QMessageLogger(__FILE__, 786, __PRETTY_FUNCTION__).debug("Could not query active accessibility event listeners.");
0
727 }-
728}-
729-
730void AtSpiAdaptor::eventListenerDeregistered(const QString & , const QString & )-
731{-
732-
733 updateEventListeners();-
734}
never executed: end of block
0
735-
736void AtSpiAdaptor::eventListenerRegistered(const QString & , const QString & )-
737{-
738-
739 updateEventListeners();-
740}
never executed: end of block
0
741-
742-
743-
744-
745-
746void AtSpiAdaptor::windowActivated(QObject* window, bool active)-
747{-
748 if (!(sendWindow
sendWindowDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendWindow_activate
sendWindow_activateDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
749 return;
never executed: return;
0
750-
751 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window);-
752 ((!(iface)) ? qt_assert("iface",__FILE__,812) : qt_noop());-
753 ((!(!active || iface->isValid())) ? qt_assert("!active || iface->isValid()",__FILE__,813) : qt_noop());-
754-
755 QString windowTitle;-
756-
757 if (iface->isValid()
iface->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
758 windowTitle = iface->text(QAccessible::Name);
never executed: windowTitle = iface->text(QAccessible::Name);
0
759-
760 QDBusVariant data;-
761 data.setVariant(windowTitle);-
762-
763 QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(data));-
764-
765 QString status = active
activeDescription
TRUEnever evaluated
FALSEnever evaluated
? QLatin1String("Activate") : QLatin1String("Deactivate");
0
766 QString path = pathForObject(window);-
767 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Window"), status, args);-
768-
769 QVariantList stateArgs = packDBusSignalArguments(QLatin1String("active"), active ? 1 : 0, 0, variantForPath(path));-
770 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
771 QLatin1String("StateChanged"), stateArgs);-
772}
never executed: end of block
0
773-
774QVariantList AtSpiAdaptor::packDBusSignalArguments(const QString &type, int data1, int data2, const QVariant &variantData) const-
775{-
776 QVariantList arguments;-
777 arguments << type << data1 << data2 << variantData-
778 << QVariant::fromValue(QSpiObjectReference(m_dbus->connection(), QDBusObjectPath("/org/a11y/atspi/accessible/" "root")));-
779 return
never executed: return arguments;
arguments;
never executed: return arguments;
0
780}-
781-
782QVariant AtSpiAdaptor::variantForPath(const QString &path) const-
783{-
784 QDBusVariant data;-
785 data.setVariant(QVariant::fromValue(QSpiObjectReference(m_dbus->connection(), QDBusObjectPath(path))));-
786 return
never executed: return QVariant::fromValue(data);
QVariant::fromValue(data);
never executed: return QVariant::fromValue(data);
0
787}-
788-
789bool AtSpiAdaptor::sendDBusSignal(const QString &path, const QString &interface, const QString &signalName, const QVariantList &arguments) const-
790{-
791 QDBusMessage message = QDBusMessage::createSignal(path, interface, signalName);-
792 message.setArguments(arguments);-
793 return
never executed: return m_dbus->connection().send(message);
m_dbus->connection().send(message);
never executed: return m_dbus->connection().send(message);
0
794}-
795-
796QAccessibleInterface *AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) const-
797{-
798 if (dbusPath == QLatin1String("/org/a11y/atspi/accessible/" "root")
dbusPath == QL...ible/" "root")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
799 return
never executed: return QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));
QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));
never executed: return QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));
0
800-
801 QStringList parts = dbusPath.split(QLatin1Char('/'));-
802 if (parts.size() != 6
parts.size() != 6Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
803 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 863, __PRETTY_FUNCTION__).debug() << "invalid path: " << dbusPath;
never executed: QMessageLogger(__FILE__, 863, __PRETTY_FUNCTION__).debug() << "invalid path: " << dbusPath;
0
804 return
never executed: return 0;
0;
never executed: return 0;
0
805 }-
806-
807 QString objectString = parts.at(5);-
808 QAccessible::Id id = objectString.toUInt();-
809-
810-
811 if ((
(int)id >= 0Description
TRUEnever evaluated
FALSEnever evaluated
int)id >= 0
(int)id >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
812 QMessageLogger(__FILE__, 872, __PRETTY_FUNCTION__).warning() << "No accessible object found for id: " << id;
never executed: QMessageLogger(__FILE__, 872, __PRETTY_FUNCTION__).warning() << "No accessible object found for id: " << id;
0
813-
814 return
never executed: return QAccessible::accessibleInterface(id);
QAccessible::accessibleInterface(id);
never executed: return QAccessible::accessibleInterface(id);
0
815}-
816-
817void AtSpiAdaptor::notifyStateChange(QAccessibleInterface *interface, const QString &state, int value)-
818{-
819 QString path = pathForInterface(interface);-
820 QVariantList stateArgs = packDBusSignalArguments(state, value, 0, variantForPath(path));-
821 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
822 QLatin1String("StateChanged"), stateArgs);-
823}
never executed: end of block
0
824-
825-
826-
827-
828-
829void AtSpiAdaptor::notify(QAccessibleEvent *event)-
830{-
831 switch (event->type()) {-
832 case
never executed: case QAccessible::ObjectCreated:
QAccessible::ObjectCreated:
never executed: case QAccessible::ObjectCreated:
0
833 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_children_changed
sendObject_children_changedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
834 notifyAboutCreation(event->accessibleInterface());
never executed: notifyAboutCreation(event->accessibleInterface());
0
835 break;
never executed: break;
0
836 case
never executed: case QAccessible::ObjectShow:
QAccessible::ObjectShow:
never executed: case QAccessible::ObjectShow:
{
0
837 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_state_changed
sendObject_state_changedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
838 notifyStateChange(event->accessibleInterface(), QLatin1String("showing"), 1);-
839 }
never executed: end of block
0
840 break;
never executed: break;
0
841 }-
842 case
never executed: case QAccessible::ObjectHide:
QAccessible::ObjectHide:
never executed: case QAccessible::ObjectHide:
{
0
843 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_state_changed
sendObject_state_changedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
844 notifyStateChange(event->accessibleInterface(), QLatin1String("showing"), 0);-
845 }
never executed: end of block
0
846 break;
never executed: break;
0
847 }-
848 case
never executed: case QAccessible::ObjectDestroyed:
QAccessible::ObjectDestroyed:
never executed: case QAccessible::ObjectDestroyed:
{
0
849 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_state_changed
sendObject_state_changedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
850 notifyAboutDestruction(event->accessibleInterface());
never executed: notifyAboutDestruction(event->accessibleInterface());
0
851 break;
never executed: break;
0
852 }-
853 case
never executed: case QAccessible::ObjectReorder:
QAccessible::ObjectReorder:
never executed: case QAccessible::ObjectReorder:
{
0
854 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_children_changed
sendObject_children_changedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
855 childrenChanged(event->accessibleInterface());
never executed: childrenChanged(event->accessibleInterface());
0
856 break;
never executed: break;
0
857 }-
858 case
never executed: case QAccessible::NameChanged:
QAccessible::NameChanged:
never executed: case QAccessible::NameChanged:
{
0
859 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_property_change
sendObject_property_changeDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_property_change_accessible_name
sendObject_pro...ccessible_nameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
860 QString path = pathForInterface(event->accessibleInterface());-
861 QVariantList args = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path));-
862 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
863 QLatin1String("PropertyChange"), args);-
864 }
never executed: end of block
0
865 break;
never executed: break;
0
866 }-
867 case
never executed: case QAccessible::DescriptionChanged:
QAccessible::DescriptionChanged:
never executed: case QAccessible::DescriptionChanged:
{
0
868 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_property_change
sendObject_property_changeDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_property_change_accessible_description
sendObject_pro...le_descriptionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
869 QString path = pathForInterface(event->accessibleInterface());-
870 QVariantList args = packDBusSignalArguments(QLatin1String("accessible-description"), 0, 0, variantForPath(path));-
871 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
872 QLatin1String("PropertyChange"), args);-
873 }
never executed: end of block
0
874 break;
never executed: break;
0
875 }-
876 case
never executed: case QAccessible::Focus:
QAccessible::Focus:
never executed: case QAccessible::Focus:
{
0
877 if (sendFocus
sendFocusDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_state_changed
sendObject_state_changedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
878 sendFocusChanged(event->accessibleInterface());
never executed: sendFocusChanged(event->accessibleInterface());
0
879 break;
never executed: break;
0
880 }-
881 case
never executed: case QAccessible::TextInserted:
QAccessible::TextInserted:
never executed: case QAccessible::TextInserted:
0
882 case
never executed: case QAccessible::TextRemoved:
QAccessible::TextRemoved:
never executed: case QAccessible::TextRemoved:
0
883 case
never executed: case QAccessible::TextUpdated:
QAccessible::TextUpdated:
never executed: case QAccessible::TextUpdated:
{
0
884 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_text_changed
sendObject_text_changedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
885 QAccessibleInterface * iface = event->accessibleInterface();-
886 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !iface->textInterface()
!iface->textInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
887 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 947, __PRETTY_FUNCTION__).debug("Received text event for invalid interface.");
never executed: QMessageLogger(__FILE__, 947, __PRETTY_FUNCTION__).debug("Received text event for invalid interface.");
0
888 return;
never executed: return;
0
889 }-
890 QString path = pathForInterface(iface);-
891-
892 int changePosition = 0;-
893 int cursorPosition = 0;-
894 QString textRemoved;-
895 QString textInserted;-
896-
897 if (event->type() == QAccessible::TextInserted
event->type() ...::TextInsertedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
898 QAccessibleTextInsertEvent *textEvent = static_cast<QAccessibleTextInsertEvent*>(event);-
899 textInserted = textEvent->textInserted();-
900 changePosition = textEvent->changePosition();-
901 cursorPosition = textEvent->cursorPosition();-
902 }
never executed: end of block
else if (event->type() == QAccessible::TextRemoved
event->type() ...e::TextRemovedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
903 QAccessibleTextRemoveEvent *textEvent = static_cast<QAccessibleTextRemoveEvent*>(event);-
904 textRemoved = textEvent->textRemoved();-
905 changePosition = textEvent->changePosition();-
906 cursorPosition = textEvent->cursorPosition();-
907 }
never executed: end of block
else if (event->type() == QAccessible::TextInserted
event->type() ...::TextInsertedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
908 QAccessibleTextUpdateEvent *textEvent = static_cast<QAccessibleTextUpdateEvent*>(event);-
909 textInserted = textEvent->textInserted();-
910 textRemoved = textEvent->textRemoved();-
911 changePosition = textEvent->changePosition();-
912 cursorPosition = textEvent->cursorPosition();-
913 }
never executed: end of block
0
914-
915 QDBusVariant data;-
916-
917 if (!textRemoved.isEmpty()
!textRemoved.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
918 data.setVariant(QVariant::fromValue(textRemoved));-
919 QVariantList args = packDBusSignalArguments(QLatin1String("delete"), changePosition, textRemoved.length(), QVariant::fromValue(data));-
920 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
921 QLatin1String("TextChanged"), args);-
922 }
never executed: end of block
0
923-
924 if (!textInserted.isEmpty()
!textInserted.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
925 data.setVariant(QVariant::fromValue(textInserted));-
926 QVariantList args = packDBusSignalArguments(QLatin1String("insert"), changePosition, textInserted.length(), QVariant::fromValue(data));-
927 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
928 QLatin1String("TextChanged"), args);-
929 }
never executed: end of block
0
930-
931-
932 (void)cursorPosition;-
933-
934-
935-
936-
937-
938 }
never executed: end of block
0
939 break;
never executed: break;
0
940 }-
941 case
never executed: case QAccessible::TextCaretMoved:
QAccessible::TextCaretMoved:
never executed: case QAccessible::TextCaretMoved:
{
0
942 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_text_caret_moved
sendObject_text_caret_movedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
943 QAccessibleInterface * iface = event->accessibleInterface();-
944 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !iface->textInterface()
!iface->textInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
945 QMessageLogger(__FILE__, 1005, __PRETTY_FUNCTION__).warning() << "Sending TextCaretMoved from object that does not implement text interface: " << iface;-
946 return;
never executed: return;
0
947 }-
948-
949 QString path = pathForInterface(iface);-
950 QDBusVariant cursorData;-
951 int pos = iface->textInterface()->cursorPosition();-
952 cursorData.setVariant(QVariant::fromValue(pos));-
953 QVariantList args = packDBusSignalArguments(QString(), pos, 0, QVariant::fromValue(cursorData));-
954 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
955 QLatin1String("TextCaretMoved"), args);-
956 }
never executed: end of block
0
957 break;
never executed: break;
0
958 }-
959 case
never executed: case QAccessible::TextSelectionChanged:
QAccessible::TextSelectionChanged:
never executed: case QAccessible::TextSelectionChanged:
{
0
960 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_text_selection_changed
sendObject_tex...ection_changedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
961 QAccessibleInterface * iface = event->accessibleInterface();-
962 QString path = pathForInterface(iface);-
963 QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(QDBusVariant(QVariant(QString()))));-
964 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
965 QLatin1String("TextSelectionChanged"), args);-
966 }
never executed: end of block
0
967 break;
never executed: break;
0
968 }-
969 case
never executed: case QAccessible::ValueChanged:
QAccessible::ValueChanged:
never executed: case QAccessible::ValueChanged:
{
0
970 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_value_changed
sendObject_value_changedDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_property_change_accessible_value
sendObject_pro...cessible_valueDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
971 QAccessibleInterface * iface = event->accessibleInterface();-
972 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
973 QMessageLogger(__FILE__, 1033, __PRETTY_FUNCTION__).warning("ValueChanged event from invalid accessible.");-
974 return;
never executed: return;
0
975 }-
976 if (iface->valueInterface()
iface->valueInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
977 QString path = pathForInterface(iface);-
978 QVariantList args = packDBusSignalArguments(QLatin1String("accessible-value"), 0, 0, variantForPath(path));-
979 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
980 QLatin1String("PropertyChange"), args);-
981 }
never executed: end of block
else if (iface->role() == QAccessible::ComboBox
iface->role() ...ible::ComboBoxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
982-
983-
984 QString path = pathForInterface(iface);-
985 QVariantList args1 = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path));-
986 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
987 QLatin1String("PropertyChange"), args1);-
988 QVariantList args2 = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(QDBusVariant(QVariant(0))));-
989 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
990 QLatin1String("SelectionChanged"), args2);-
991 }
never executed: end of block
else {
0
992 QMessageLogger(__FILE__, 1052, __PRETTY_FUNCTION__).warning() << "ValueChanged event and no ValueInterface or ComboBox: " << iface;-
993 }
never executed: end of block
0
994 }-
995 break;
never executed: break;
0
996 }-
997 case
never executed: case QAccessible::SelectionAdd:
QAccessible::SelectionAdd:
never executed: case QAccessible::SelectionAdd:
0
998 case
never executed: case QAccessible::SelectionRemove:
QAccessible::SelectionRemove:
never executed: case QAccessible::SelectionRemove:
0
999 case
never executed: case QAccessible::Selection:
QAccessible::Selection:
never executed: case QAccessible::Selection:
{
0
1000 QAccessibleInterface * iface = event->accessibleInterface();-
1001 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1002 QMessageLogger(__FILE__, 1062, __PRETTY_FUNCTION__).warning("Selection event from invalid accessible.");-
1003 return;
never executed: return;
0
1004 }-
1005 QString path = pathForInterface(iface);-
1006 int selected = iface->state().selected
iface->state().selectedDescription
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
0
1007 QVariantList stateArgs = packDBusSignalArguments(QLatin1String("selected"), selected, 0, variantForPath(path));-
1008 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
1009 QLatin1String("StateChanged"), stateArgs);-
1010 break;
never executed: break;
0
1011 }-
1012-
1013 case
never executed: case QAccessible::StateChanged:
QAccessible::StateChanged:
never executed: case QAccessible::StateChanged:
{
0
1014 if (sendObject
sendObjectDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendObject_state_changed
sendObject_state_changedDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendWindow
sendWindowDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendWindow_activate
sendWindow_activateDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1015 QAccessible::State stateChange = static_cast<QAccessibleStateChangeEvent*>(event)->changedStates();-
1016 if (stateChange.checked
stateChange.checkedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1017 QAccessibleInterface * iface = event->accessibleInterface();-
1018 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1019 QMessageLogger(__FILE__, 1079, __PRETTY_FUNCTION__).warning("StateChanged event from invalid accessible.");-
1020 return;
never executed: return;
0
1021 }-
1022 int checked = iface->state().checked;-
1023 notifyStateChange(iface, QLatin1String("checked"), checked);-
1024 }
never executed: end of block
else if (stateChange.active
stateChange.activeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1025 QAccessibleInterface * iface = event->accessibleInterface();-
1026 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !(iface->role() == QAccessible::Window
iface->role() ...ssible::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
&& (sendWindow
sendWindowDescription
TRUEnever evaluated
FALSEnever evaluated
|| sendWindow_activate
sendWindow_activateDescription
TRUEnever evaluated
FALSEnever evaluated
)))
0
1027 return;
never executed: return;
0
1028 int isActive = iface->state().active;-
1029 QString windowTitle = iface->text(QAccessible::Name);-
1030 QDBusVariant data;-
1031 data.setVariant(windowTitle);-
1032 QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(data));-
1033 QString status = isActive
isActiveDescription
TRUEnever evaluated
FALSEnever evaluated
? QLatin1String("Activate") : QLatin1String("Deactivate");
0
1034 QString path = pathForInterface(iface);-
1035 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Window"), status, args);-
1036 notifyStateChange(iface, QLatin1String("active"), isActive);-
1037 }
never executed: end of block
else if (stateChange.disabled
stateChange.disabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1038 QAccessibleInterface *iface = event->accessibleInterface();-
1039 QAccessible::State state = iface->state();-
1040 bool enabled = !state.disabled;-
1041-
1042 notifyStateChange(iface, QLatin1String("enabled"), enabled);-
1043 notifyStateChange(iface, QLatin1String("sensitive"), enabled);-
1044 }
never executed: end of block
0
1045 }
never executed: end of block
0
1046 break;
never executed: break;
0
1047 }-
1048-
1049 case
never executed: case QAccessible::TableModelChanged:
QAccessible::TableModelChanged:
never executed: case QAccessible::TableModelChanged:
0
1050-
1051-
1052-
1053 case
never executed: case QAccessible::ParentChanged:
QAccessible::ParentChanged:
never executed: case QAccessible::ParentChanged:
0
1054 case
never executed: case QAccessible::DialogStart:
QAccessible::DialogStart:
never executed: case QAccessible::DialogStart:
0
1055 case
never executed: case QAccessible::DialogEnd:
QAccessible::DialogEnd:
never executed: case QAccessible::DialogEnd:
0
1056 case
never executed: case QAccessible::PopupMenuStart:
QAccessible::PopupMenuStart:
never executed: case QAccessible::PopupMenuStart:
0
1057 case
never executed: case QAccessible::PopupMenuEnd:
QAccessible::PopupMenuEnd:
never executed: case QAccessible::PopupMenuEnd:
0
1058 case
never executed: case QAccessible::SoundPlayed:
QAccessible::SoundPlayed:
never executed: case QAccessible::SoundPlayed:
0
1059 case
never executed: case QAccessible::Alert:
QAccessible::Alert:
never executed: case QAccessible::Alert:
0
1060 case
never executed: case QAccessible::ForegroundChanged:
QAccessible::ForegroundChanged:
never executed: case QAccessible::ForegroundChanged:
0
1061 case
never executed: case QAccessible::MenuStart:
QAccessible::MenuStart:
never executed: case QAccessible::MenuStart:
0
1062 case
never executed: case QAccessible::MenuEnd:
QAccessible::MenuEnd:
never executed: case QAccessible::MenuEnd:
0
1063 case
never executed: case QAccessible::ContextHelpStart:
QAccessible::ContextHelpStart:
never executed: case QAccessible::ContextHelpStart:
0
1064 case
never executed: case QAccessible::ContextHelpEnd:
QAccessible::ContextHelpEnd:
never executed: case QAccessible::ContextHelpEnd:
0
1065 case
never executed: case QAccessible::DragDropStart:
QAccessible::DragDropStart:
never executed: case QAccessible::DragDropStart:
0
1066 case
never executed: case QAccessible::DragDropEnd:
QAccessible::DragDropEnd:
never executed: case QAccessible::DragDropEnd:
0
1067 case
never executed: case QAccessible::ScrollingStart:
QAccessible::ScrollingStart:
never executed: case QAccessible::ScrollingStart:
0
1068 case
never executed: case QAccessible::ScrollingEnd:
QAccessible::ScrollingEnd:
never executed: case QAccessible::ScrollingEnd:
0
1069 case
never executed: case QAccessible::MenuCommand:
QAccessible::MenuCommand:
never executed: case QAccessible::MenuCommand:
0
1070 case
never executed: case QAccessible::ActionChanged:
QAccessible::ActionChanged:
never executed: case QAccessible::ActionChanged:
0
1071 case
never executed: case QAccessible::ActiveDescendantChanged:
QAccessible::ActiveDescendantChanged:
never executed: case QAccessible::ActiveDescendantChanged:
0
1072 case
never executed: case QAccessible::AttributeChanged:
QAccessible::AttributeChanged:
never executed: case QAccessible::AttributeChanged:
0
1073 case
never executed: case QAccessible::DocumentContentChanged:
QAccessible::DocumentContentChanged:
never executed: case QAccessible::DocumentContentChanged:
0
1074 case
never executed: case QAccessible::DocumentLoadComplete:
QAccessible::DocumentLoadComplete:
never executed: case QAccessible::DocumentLoadComplete:
0
1075 case
never executed: case QAccessible::DocumentLoadStopped:
QAccessible::DocumentLoadStopped:
never executed: case QAccessible::DocumentLoadStopped:
0
1076 case
never executed: case QAccessible::DocumentReload:
QAccessible::DocumentReload:
never executed: case QAccessible::DocumentReload:
0
1077 case
never executed: case QAccessible::HyperlinkEndIndexChanged:
QAccessible::HyperlinkEndIndexChanged:
never executed: case QAccessible::HyperlinkEndIndexChanged:
0
1078 case
never executed: case QAccessible::HyperlinkNumberOfAnchorsChanged:
QAccessible::HyperlinkNumberOfAnchorsChanged:
never executed: case QAccessible::HyperlinkNumberOfAnchorsChanged:
0
1079 case
never executed: case QAccessible::HyperlinkSelectedLinkChanged:
QAccessible::HyperlinkSelectedLinkChanged:
never executed: case QAccessible::HyperlinkSelectedLinkChanged:
0
1080 case
never executed: case QAccessible::HypertextLinkActivated:
QAccessible::HypertextLinkActivated:
never executed: case QAccessible::HypertextLinkActivated:
0
1081 case
never executed: case QAccessible::HypertextLinkSelected:
QAccessible::HypertextLinkSelected:
never executed: case QAccessible::HypertextLinkSelected:
0
1082 case
never executed: case QAccessible::HyperlinkStartIndexChanged:
QAccessible::HyperlinkStartIndexChanged:
never executed: case QAccessible::HyperlinkStartIndexChanged:
0
1083 case
never executed: case QAccessible::HypertextChanged:
QAccessible::HypertextChanged:
never executed: case QAccessible::HypertextChanged:
0
1084 case
never executed: case QAccessible::HypertextNLinksChanged:
QAccessible::HypertextNLinksChanged:
never executed: case QAccessible::HypertextNLinksChanged:
0
1085 case
never executed: case QAccessible::ObjectAttributeChanged:
QAccessible::ObjectAttributeChanged:
never executed: case QAccessible::ObjectAttributeChanged:
0
1086 case
never executed: case QAccessible::PageChanged:
QAccessible::PageChanged:
never executed: case QAccessible::PageChanged:
0
1087 case
never executed: case QAccessible::SectionChanged:
QAccessible::SectionChanged:
never executed: case QAccessible::SectionChanged:
0
1088 case
never executed: case QAccessible::TableCaptionChanged:
QAccessible::TableCaptionChanged:
never executed: case QAccessible::TableCaptionChanged:
0
1089 case
never executed: case QAccessible::TableColumnDescriptionChanged:
QAccessible::TableColumnDescriptionChanged:
never executed: case QAccessible::TableColumnDescriptionChanged:
0
1090 case
never executed: case QAccessible::TableColumnHeaderChanged:
QAccessible::TableColumnHeaderChanged:
never executed: case QAccessible::TableColumnHeaderChanged:
0
1091 case
never executed: case QAccessible::TableRowDescriptionChanged:
QAccessible::TableRowDescriptionChanged:
never executed: case QAccessible::TableRowDescriptionChanged:
0
1092 case
never executed: case QAccessible::TableRowHeaderChanged:
QAccessible::TableRowHeaderChanged:
never executed: case QAccessible::TableRowHeaderChanged:
0
1093 case
never executed: case QAccessible::TableSummaryChanged:
QAccessible::TableSummaryChanged:
never executed: case QAccessible::TableSummaryChanged:
0
1094 case
never executed: case QAccessible::TextAttributeChanged:
QAccessible::TextAttributeChanged:
never executed: case QAccessible::TextAttributeChanged:
0
1095 case
never executed: case QAccessible::TextColumnChanged:
QAccessible::TextColumnChanged:
never executed: case QAccessible::TextColumnChanged:
0
1096 case
never executed: case QAccessible::VisibleDataChanged:
QAccessible::VisibleDataChanged:
never executed: case QAccessible::VisibleDataChanged:
0
1097 case
never executed: case QAccessible::SelectionWithin:
QAccessible::SelectionWithin:
never executed: case QAccessible::SelectionWithin:
0
1098 case
never executed: case QAccessible::LocationChanged:
QAccessible::LocationChanged:
never executed: case QAccessible::LocationChanged:
0
1099 case
never executed: case QAccessible::HelpChanged:
QAccessible::HelpChanged:
never executed: case QAccessible::HelpChanged:
0
1100 case
never executed: case QAccessible::DefaultActionChanged:
QAccessible::DefaultActionChanged:
never executed: case QAccessible::DefaultActionChanged:
0
1101 case
never executed: case QAccessible::AcceleratorChanged:
QAccessible::AcceleratorChanged:
never executed: case QAccessible::AcceleratorChanged:
0
1102 case
never executed: case QAccessible::InvalidEvent:
QAccessible::InvalidEvent:
never executed: case QAccessible::InvalidEvent:
0
1103 break;
never executed: break;
0
1104 }-
1105}
never executed: end of block
0
1106-
1107void AtSpiAdaptor::sendFocusChanged(QAccessibleInterface *interface) const-
1108{-
1109 static QString lastFocusPath;-
1110-
1111 if (!lastFocusPath.isEmpty()
!lastFocusPath.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1112 QVariantList stateArgs = packDBusSignalArguments(QLatin1String("focused"), 0, 0, variantForPath(lastFocusPath));-
1113 sendDBusSignal(lastFocusPath, QLatin1String("org.a11y.atspi.Event.Object"),-
1114 QLatin1String("StateChanged"), stateArgs);-
1115 }
never executed: end of block
0
1116-
1117 {-
1118 QString path = pathForInterface(interface);-
1119-
1120 QVariantList stateArgs = packDBusSignalArguments(QLatin1String("focused"), 1, 0, variantForPath(path));-
1121 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Object"),-
1122 QLatin1String("StateChanged"), stateArgs);-
1123-
1124 QVariantList focusArgs = packDBusSignalArguments(QString(), 0, 0, variantForPath(path));-
1125 sendDBusSignal(path, QLatin1String("org.a11y.atspi.Event.Focus"),-
1126 QLatin1String("Focus"), focusArgs);-
1127 lastFocusPath = path;-
1128 }-
1129}
never executed: end of block
0
1130-
1131void AtSpiAdaptor::childrenChanged(QAccessibleInterface *interface) const-
1132{-
1133 QString parentPath = pathForInterface(interface);-
1134 int childCount = interface->childCount();-
1135 for (int i = 0; i < interface->childCount()
i < interface->childCount()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1136 QString childPath = pathForInterface(interface->child(i));-
1137 QVariantList args = packDBusSignalArguments(QLatin1String("add"), childCount, 0, childPath);-
1138 sendDBusSignal(parentPath, QLatin1String("org.a11y.atspi.Event.Object"), QLatin1String("ChildrenChanged"), args);-
1139 }
never executed: end of block
0
1140}
never executed: end of block
0
1141-
1142void AtSpiAdaptor::notifyAboutCreation(QAccessibleInterface *interface) const-
1143{-
1144-
1145-
1146-
1147-
1148 QAccessibleInterface * parent = interface->parent();-
1149 if (!parent
!parentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1150 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1210, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutCreation: Could not find parent for " << interface->object();
never executed: QMessageLogger(__FILE__, 1210, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutCreation: Could not find parent for " << interface->object();
0
1151 return;
never executed: return;
0
1152 }-
1153 QString path = pathForInterface(interface);-
1154 int childCount = parent->childCount();-
1155 QString parentPath = pathForInterface(parent);-
1156 QVariantList args = packDBusSignalArguments(QLatin1String("add"), childCount, 0, variantForPath(path));-
1157 sendDBusSignal(parentPath, QLatin1String("org.a11y.atspi.Event.Object"), QLatin1String("ChildrenChanged"), args);-
1158}
never executed: end of block
0
1159-
1160void AtSpiAdaptor::notifyAboutDestruction(QAccessibleInterface *interface) const-
1161{-
1162 if (!interface
!interfaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !interface->isValid()
!interface->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1163 return;
never executed: return;
0
1164-
1165 QAccessibleInterface * parent = interface->parent();-
1166 if (!parent
!parentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1167 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1227, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutDestruction: Could not find parent for " << interface->object();
never executed: QMessageLogger(__FILE__, 1227, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutDestruction: Could not find parent for " << interface->object();
0
1168 return;
never executed: return;
0
1169 }-
1170 QString path = pathForInterface(interface);-
1171-
1172-
1173-
1174 int childIndex = -1;-
1175-
1176-
1177-
1178-
1179-
1180-
1181 QString parentPath = pathForInterface(parent);-
1182 QVariantList args = packDBusSignalArguments(QLatin1String("remove"), childIndex, 0, variantForPath(path));-
1183 sendDBusSignal(parentPath, QLatin1String("org.a11y.atspi.Event.Object"), QLatin1String("ChildrenChanged"), args);-
1184}
never executed: end of block
0
1185-
1186-
1187-
1188-
1189-
1190bool AtSpiAdaptor::handleMessage(const QDBusMessage &message, const QDBusConnection &connection)-
1191{-
1192-
1193 QAccessibleInterface * accessible = interfaceFromPath(message.path());-
1194 if (!accessible
!accessibleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1195 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1255, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << message.path();
never executed: QMessageLogger(__FILE__, 1255, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << message.path();
0
1196 return
never executed: return false;
false;
never executed: return false;
0
1197 }-
1198 if (!accessible->isValid()
!accessible->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1199 QMessageLogger(__FILE__, 1259, __PRETTY_FUNCTION__).warning() << "WARNING Qt AtSpiAdaptor: Accessible invalid: " << accessible << message.path();-
1200 return
never executed: return false;
false;
never executed: return false;
0
1201 }-
1202-
1203 QString interface = message.interface();-
1204 QString function = message.member();-
1205-
1206-
1207-
1208 if (function == QLatin1String("Introspect")
function == QL...("Introspect")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1209-
1210 return
never executed: return false;
false;
never executed: return false;
0
1211 }-
1212-
1213-
1214 if (interface
interface == Q...s.Properties")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.freedesktop.DBus.Properties")
interface == Q...s.Properties")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1215 interface = message.arguments().at(0).toString();-
1216-
1217 function = message.member() + message.arguments().at(1).toString();-
1218 }
never executed: end of block
0
1219-
1220-
1221 if (interface
interface == Q...i.Accessible")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Accessible")
interface == Q...i.Accessible")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1222 return
never executed: return accessibleInterface(accessible, function, message, connection);
accessibleInterface(accessible, function, message, connection);
never executed: return accessibleInterface(accessible, function, message, connection);
0
1223 if (interface
interface == Q....Application")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Application")
interface == Q....Application")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1224 return
never executed: return applicationInterface(accessible, function, message, connection);
applicationInterface(accessible, function, message, connection);
never executed: return applicationInterface(accessible, function, message, connection);
0
1225 if (interface
interface == Q...pi.Component")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Component")
interface == Q...pi.Component")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1226 return
never executed: return componentInterface(accessible, function, message, connection);
componentInterface(accessible, function, message, connection);
never executed: return componentInterface(accessible, function, message, connection);
0
1227 if (interface
interface == Q...atspi.Action")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Action")
interface == Q...atspi.Action")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1228 return
never executed: return actionInterface(accessible, function, message, connection);
actionInterface(accessible, function, message, connection);
never executed: return actionInterface(accessible, function, message, connection);
0
1229 if (interface
interface == Q...y.atspi.Text")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Text")
interface == Q...y.atspi.Text")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1230 return
never executed: return textInterface(accessible, function, message, connection);
textInterface(accessible, function, message, connection);
never executed: return textInterface(accessible, function, message, connection);
0
1231 if (interface
interface == Q...EditableText")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.EditableText")
interface == Q...EditableText")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1232 return
never executed: return editableTextInterface(accessible, function, message, connection);
editableTextInterface(accessible, function, message, connection);
never executed: return editableTextInterface(accessible, function, message, connection);
0
1233 if (interface
interface == Q....atspi.Value")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Value")
interface == Q....atspi.Value")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1234 return
never executed: return valueInterface(accessible, function, message, connection);
valueInterface(accessible, function, message, connection);
never executed: return valueInterface(accessible, function, message, connection);
0
1235 if (interface
interface == Q....atspi.Table")Description
TRUEnever evaluated
FALSEnever evaluated
== QLatin1String("org.a11y.atspi.Table")
interface == Q....atspi.Table")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1236 return
never executed: return tableInterface(accessible, function, message, connection);
tableInterface(accessible, function, message, connection);
never executed: return tableInterface(accessible, function, message, connection);
0
1237-
1238 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1298, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::handleMessage with unknown interface: " << message.path() << interface << function;
never executed: QMessageLogger(__FILE__, 1298, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::handleMessage with unknown interface: " << message.path() << interface << function;
0
1239 return
never executed: return false;
false;
never executed: return false;
0
1240}-
1241-
1242-
1243bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
1244{-
1245 if (message.path() != QLatin1String("/org/a11y/atspi/accessible/root")
message.path()...essible/root")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1246 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1306, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find application interface for: " << message.path() << interface;
never executed: QMessageLogger(__FILE__, 1306, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find application interface for: " << message.path() << interface;
0
1247 return
never executed: return false;
false;
never executed: return false;
0
1248 }-
1249-
1250 if (function == QLatin1String("SetId")
function == QL...tring("SetId")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1251 ((!(message.signature() == QLatin1String("ssv"))) ? qt_assert("message.signature() == QLatin1String(\"ssv\")",__FILE__,1311) : qt_noop());-
1252 QVariant value = qvariant_cast<QDBusVariant>(message.arguments().at(2)).variant();-
1253-
1254 m_applicationId = value.toInt();-
1255 return
never executed: return true;
true;
never executed: return true;
0
1256 }-
1257 if (function == QLatin1String("GetId")
function == QL...tring("GetId")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1258 ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1318) : qt_noop());-
1259 QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(m_applicationId)));-
1260 return
never executed: return connection.send(reply);
connection.send(reply);
never executed: return connection.send(reply);
0
1261 }-
1262 if (function == QLatin1String("GetToolkitName")
function == QL...tToolkitName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1263 ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1323) : qt_noop());-
1264 QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String("Qt"))));-
1265 return
never executed: return connection.send(reply);
connection.send(reply);
never executed: return connection.send(reply);
0
1266 }-
1267 if (function == QLatin1String("GetVersion")
function == QL...("GetVersion")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1268 ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1328) : qt_noop());-
1269 QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String(qVersion()))));-
1270 return
never executed: return connection.send(reply);
connection.send(reply);
never executed: return connection.send(reply);
0
1271 }-
1272 if (function == QLatin1String("GetLocale")
function == QL...g("GetLocale")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1273 ((!(message.signature() == QLatin1String("u"))) ? qt_assert("message.signature() == QLatin1String(\"u\")",__FILE__,1333) : qt_noop());-
1274 QDBusMessage reply = message.createReply(QVariant::fromValue(QLocale().name()));-
1275 return
never executed: return connection.send(reply);
connection.send(reply);
never executed: return connection.send(reply);
0
1276 }-
1277 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1337, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::applicationInterface " << message.path() << interface << function;
never executed: QMessageLogger(__FILE__, 1337, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::applicationInterface " << message.path() << interface << function;
0
1278 return
never executed: return false;
false;
never executed: return false;
0
1279}-
1280-
1281-
1282-
1283-
1284void AtSpiAdaptor::registerApplication()-
1285{-
1286 OrgA11yAtspiSocketInterface *registry;-
1287 registry = new OrgA11yAtspiSocketInterface(QLatin1String("org.a11y.atspi.Registry"),-
1288 QLatin1String("/org/a11y/atspi/accessible/" "root"), m_dbus->connection());-
1289-
1290 QDBusPendingReply<QSpiObjectReference> reply;-
1291 QSpiObjectReference ref = QSpiObjectReference(m_dbus->connection(), QDBusObjectPath("/org/a11y/atspi/accessible/" "root"));-
1292 reply = registry->Embed(ref);-
1293 reply.waitForFinished();-
1294 if (reply.isValid ()
reply.isValid ()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1295 const QSpiObjectReference &socket = reply.value();-
1296 accessibilityRegistry = QSpiObjectReference(socket);-
1297 }
never executed: end of block
else {
0
1298 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: "
never executed: QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: " << reply.error().name() << reply.error().message();
0
1299 << reply.error().name()
never executed: QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: " << reply.error().name() << reply.error().message();
0
1300 << reply.error().message();
never executed: QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: " << reply.error().name() << reply.error().message();
0
1301 }-
1302 delete registry;-
1303}
never executed: end of block
0
1304-
1305-
1306bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
1307{-
1308 if (function == QLatin1String("GetRole")
function == QL...ing("GetRole")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1309 sendReply(connection, message, (uint) getRole(interface));-
1310 }
never executed: end of block
else if (function == QLatin1String("GetName")
function == QL...ing("GetName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1311 sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Name))));-
1312 }
never executed: end of block
else if (function == QLatin1String("GetRoleName")
function == QL..."GetRoleName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1313 sendReply(connection, message, qSpiRoleMapping[interface->role()].name());-
1314 }
never executed: end of block
else if (function == QLatin1String("GetLocalizedRoleName")
function == QL...izedRoleName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1315 sendReply(connection, message, QVariant::fromValue(qSpiRoleMapping[interface->role()].localizedName()));-
1316 }
never executed: end of block
else if (function == QLatin1String("GetChildCount")
function == QL...etChildCount")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1317 sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->childCount())));-
1318 }
never executed: end of block
else if (function == QLatin1String("GetIndexInParent")
function == QL...ndexInParent")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1319 int childIndex = -1;-
1320 QAccessibleInterface * parent = interface->parent();-
1321 if (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1322 childIndex = parent->indexOfChild(interface);-
1323 if (childIndex < 0
childIndex < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1324 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1384, __PRETTY_FUNCTION__).debug() << "GetIndexInParent get invalid index: " << childIndex << interface;
never executed: QMessageLogger(__FILE__, 1384, __PRETTY_FUNCTION__).debug() << "GetIndexInParent get invalid index: " << childIndex << interface;
0
1325 }-
1326 }
never executed: end of block
0
1327 sendReply(connection, message, childIndex);-
1328 }
never executed: end of block
else if (function == QLatin1String("GetParent")
function == QL...g("GetParent")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1329 QString path;-
1330 QAccessibleInterface * parent = interface->parent();-
1331 if (!parent
!parentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1332 path = QLatin1String("/org/a11y/atspi/null");-
1333 }
never executed: end of block
else if (parent->role() == QAccessible::Application
parent->role()...e::ApplicationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1334 path = QLatin1String("/org/a11y/atspi/accessible/root");-
1335 }
never executed: end of block
else {
0
1336 path = pathForInterface(parent);-
1337 }
never executed: end of block
0
1338-
1339 sendReply(connection, message, QVariant::fromValue(-
1340 QDBusVariant(QVariant::fromValue(QSpiObjectReference(connection, QDBusObjectPath(path))))));-
1341 }
never executed: end of block
else if (function == QLatin1String("GetChildAtIndex")
function == QL...ChildAtIndex")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1342 int index = message.arguments().first().toInt();-
1343 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1344 sendReply(connection, message, QVariant::fromValue(-
1345 QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/null"))));-
1346 }
never executed: end of block
else {
0
1347 QAccessibleInterface * childInterface = interface->child(index);-
1348 sendReply(connection, message, QVariant::fromValue(-
1349 QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(childInterface)))));-
1350 }
never executed: end of block
0
1351 } else if (function == QLatin1String("GetInterfaces")
function == QL...etInterfaces")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1352 sendReply(connection, message, accessibleInterfaces(interface));-
1353 }
never executed: end of block
else if (function == QLatin1String("GetDescription")
function == QL...tDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1354 sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Description))));-
1355 }
never executed: end of block
else if (function == QLatin1String("GetState")
function == QL...ng("GetState")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1356 quint64 spiState = spiStatesFromQState(interface->state());-
1357 if (interface->
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
tableInterface()
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1358 setSpiStateBit(&spiState, ATSPI_STATE_MANAGES_DESCENDANTS);-
1359 }
never executed: end of block
0
1360 QAccessible::Role role = interface->role();-
1361 if (role == QAccessible::TreeItem
role == QAccessible::TreeItemDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1362 role == QAccessible::ListItem
role == QAccessible::ListItemDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1363-
1364-
1365-
1366-
1367 setSpiStateBit(&spiState, ATSPI_STATE_TRANSIENT);-
1368 }
never executed: end of block
0
1369 sendReply(connection, message,-
1370 QVariant::fromValue(spiStateSetFromSpiStates(spiState)));-
1371 }
never executed: end of block
else if (function == QLatin1String("GetAttributes")
function == QL...etAttributes")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1372 sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet()));-
1373 }
never executed: end of block
else if (function == QLatin1String("GetRelationSet")
function == QL...tRelationSet")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1374 sendReply(connection, message, QVariant::fromValue(relationSet(interface, connection)));-
1375 }
never executed: end of block
else if (function == QLatin1String("GetApplication")
function == QL...tApplication")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1376 sendReply(connection, message, QVariant::fromValue(-
1377 QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/accessible/" "root"))));-
1378 }
never executed: end of block
else if (function == QLatin1String("GetChildren")
function == QL..."GetChildren")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1379 QSpiObjectReferenceArray children;-
1380 const int numChildren = interface->childCount();-
1381 children.reserve(numChildren);-
1382 for (int i = 0; i < numChildren
i < numChildrenDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1383 QString childPath = pathForInterface(interface->child(i));-
1384 QSpiObjectReference ref(connection, QDBusObjectPath(childPath));-
1385 children << ref;-
1386 }
never executed: end of block
0
1387 connection.send(message.createReply(QVariant::fromValue(children)));-
1388 }
never executed: end of block
else {
0
1389 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1449, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::accessibleInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 1449, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::accessibleInterface does not implement " << function << message.path();
0
1390 return
never executed: return false;
false;
never executed: return false;
0
1391 }-
1392 return
never executed: return true;
true;
never executed: return true;
0
1393}-
1394-
1395AtspiRole AtSpiAdaptor::getRole(QAccessibleInterface *interface) const-
1396{-
1397 if ((interface->
(interface->ro...:EditableText)Description
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::EditableText)
(interface->ro...:EditableText)Description
TRUEnever evaluated
FALSEnever evaluated
&& interface->
interface->sta...).passwordEditDescription
TRUEnever evaluated
FALSEnever evaluated
state().passwordEdit
interface->sta...).passwordEditDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1398 return
never executed: return ATSPI_ROLE_PASSWORD_TEXT;
ATSPI_ROLE_PASSWORD_TEXT;
never executed: return ATSPI_ROLE_PASSWORD_TEXT;
0
1399 return
never executed: return qSpiRoleMapping[interface->role()].spiRole();
qSpiRoleMapping[interface->role()].spiRole();
never executed: return qSpiRoleMapping[interface->role()].spiRole();
0
1400}-
1401-
1402-
1403-
1404QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface) const-
1405{-
1406 QStringList ifaces;-
1407-
1408-
1409-
1410 ifaces << QLatin1String("org.a11y.atspi.Accessible");-
1411-
1412 if ( (
(!interface->rect().isEmpty())Description
TRUEnever evaluated
FALSEnever evaluated
!interface->rect().isEmpty())
(!interface->rect().isEmpty())Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1413 (interface->
interface->object()Description
TRUEnever evaluated
FALSEnever evaluated
object()
interface->object()Description
TRUEnever evaluated
FALSEnever evaluated
&& interface->
interface->obj...isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
object()->isWidgetType()
interface->obj...isWidgetType()Description
TRUEnever evaluated
FALSEnever evaluated
) ||
0
1414 (interface->
(interface->ro...ble::ListItem)Description
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::ListItem)
(interface->ro...ble::ListItem)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1415 (interface->
(interface->ro...essible::Cell)Description
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::Cell)
(interface->ro...essible::Cell)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1416 (interface->
(interface->ro...ble::TreeItem)Description
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::TreeItem)
(interface->ro...ble::TreeItem)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1417 (interface->
(interface->ro...cessible::Row)Description
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::Row)
(interface->ro...cessible::Row)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1418 (interface->
interface->object()Description
TRUEnever evaluated
FALSEnever evaluated
object()
interface->object()Description
TRUEnever evaluated
FALSEnever evaluated
&& interface->
interface->obj...its("QSGItem")Description
TRUEnever evaluated
FALSEnever evaluated
object()->inherits("QSGItem")
interface->obj...its("QSGItem")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1419 ) {-
1420 ifaces << QLatin1String("org.a11y.atspi.Component");-
1421 }
never executed: end of block
0
1422-
1423-
1424-
1425-
1426-
1427 if (interface->
interface->rol...e::ApplicationDescription
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::Application
interface->rol...e::ApplicationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1428 ifaces << QLatin1String("org.a11y.atspi.Application");
never executed: ifaces << QLatin1String("org.a11y.atspi.Application");
0
1429-
1430 if (interface->
interface->actionInterface()Description
TRUEnever evaluated
FALSEnever evaluated
actionInterface()
interface->actionInterface()Description
TRUEnever evaluated
FALSEnever evaluated
|| interface->
interface->valueInterface()Description
TRUEnever evaluated
FALSEnever evaluated
valueInterface()
interface->valueInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1431 ifaces << QLatin1String("org.a11y.atspi.Action");
never executed: ifaces << QLatin1String("org.a11y.atspi.Action");
0
1432-
1433 if (interface->
interface->textInterface()Description
TRUEnever evaluated
FALSEnever evaluated
textInterface()
interface->textInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1434 ifaces << QLatin1String("org.a11y.atspi.Text");
never executed: ifaces << QLatin1String("org.a11y.atspi.Text");
0
1435-
1436 if (interface->
interface->edi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
editableTextInterface()
interface->edi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1437 ifaces << QLatin1String("org.a11y.atspi.EditableText");
never executed: ifaces << QLatin1String("org.a11y.atspi.EditableText");
0
1438-
1439 if (interface->
interface->valueInterface()Description
TRUEnever evaluated
FALSEnever evaluated
valueInterface()
interface->valueInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1440 ifaces << QLatin1String("org.a11y.atspi.Value");
never executed: ifaces << QLatin1String("org.a11y.atspi.Value");
0
1441-
1442 if (interface->
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
tableInterface()
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1443 ifaces << QLatin1String("org.a11y.atspi.Table");
never executed: ifaces << QLatin1String("org.a11y.atspi.Table");
0
1444-
1445 return
never executed: return ifaces;
ifaces;
never executed: return ifaces;
0
1446}-
1447-
1448QSpiRelationArray AtSpiAdaptor::relationSet(QAccessibleInterface *interface, const QDBusConnection &connection) const-
1449{-
1450 typedef QPair<QAccessibleInterface*, QAccessible::Relation> RelationPair;-
1451 QVector<RelationPair> relationInterfaces;-
1452 relationInterfaces = interface->relations();-
1453-
1454 QSpiRelationArray relations;-
1455 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(relationInterfaces)>::type> _container_((relationInterfaces)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const RelationPair &pair = *_container_.i; _container_.control; _container_.control = 0) {-
1456-
1457-
1458 QSpiObjectReferenceArray related;-
1459-
1460 QDBusObjectPath path = QDBusObjectPath(pathForInterface(pair.first));-
1461 related.append(QSpiObjectReference(connection, path));-
1462-
1463 if (!related.isEmpty()
!related.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1464 relations.append(QSpiRelationArrayEntry(qAccessibleRelationToAtSpiRelation(pair.second), related));
never executed: relations.append(QSpiRelationArrayEntry(qAccessibleRelationToAtSpiRelation(pair.second), related));
0
1465 }
never executed: end of block
0
1466 return
never executed: return relations;
relations;
never executed: return relations;
0
1467}-
1468-
1469void AtSpiAdaptor::sendReply(const QDBusConnection &connection, const QDBusMessage &message, const QVariant &argument) const-
1470{-
1471 QDBusMessage reply = message.createReply(argument);-
1472 connection.send(reply);-
1473}
never executed: end of block
0
1474-
1475-
1476QString AtSpiAdaptor::pathForObject(QObject *object) const-
1477{-
1478 ((!(object)) ? qt_assert("object",__FILE__,1538) : qt_noop());-
1479-
1480 if (inheritsQAction(object)
inheritsQAction(object)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1481 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1541, __PRETTY_FUNCTION__).debug("AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.");
never executed: QMessageLogger(__FILE__, 1541, __PRETTY_FUNCTION__).debug("AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.");
0
1482 }-
1483-
1484 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(object);-
1485 return
never executed: return pathForInterface(iface);
pathForInterface(iface);
never executed: return pathForInterface(iface);
0
1486}-
1487-
1488QString AtSpiAdaptor::pathForInterface(QAccessibleInterface *interface) const-
1489{-
1490 if (!interface
!interfaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !interface->isValid()
!interface->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1491 return
never executed: return QLatin1String("/org/a11y/atspi/null");
QLatin1String("/org/a11y/atspi/null");
never executed: return QLatin1String("/org/a11y/atspi/null");
0
1492 if (interface->
interface->rol...e::ApplicationDescription
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::Application
interface->rol...e::ApplicationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1493 return
never executed: return QLatin1String("/org/a11y/atspi/accessible/" "root");
QLatin1String("/org/a11y/atspi/accessible/" "root");
never executed: return QLatin1String("/org/a11y/atspi/accessible/" "root");
0
1494-
1495 QAccessible::Id id = QAccessible::uniqueId(interface);-
1496 ((!((int)id < 0)) ? qt_assert("(int)id < 0",__FILE__,1556) : qt_noop());-
1497 return
never executed: return QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id);
QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id);
never executed: return QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id);
0
1498}-
1499-
1500bool AtSpiAdaptor::inheritsQAction(QObject *object)-
1501{-
1502 const QMetaObject *mo = object->metaObject();-
1503 while (mo
moDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1504 const QLatin1String cn(mo->className());-
1505 if (cn == QLatin1String("QAction")
cn == QLatin1String("QAction")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1506 return
never executed: return true;
true;
never executed: return true;
0
1507 mo = mo->superClass();-
1508 }
never executed: end of block
0
1509 return
never executed: return false;
false;
never executed: return false;
0
1510}-
1511-
1512-
1513static QAccessibleInterface * getWindow(QAccessibleInterface * interface)-
1514{-
1515 if (interface->
interface->rol...ssible::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
role() == QAccessible::Window
interface->rol...ssible::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1516 return
never executed: return interface;
interface;
never executed: return interface;
0
1517-
1518 QAccessibleInterface * parent = interface->parent();-
1519 while (parent
parentDescription
TRUEnever evaluated
FALSEnever evaluated
&& parent->role() != QAccessible::Window
parent->role()...ssible::WindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1520 parent = parent->parent();
never executed: parent = parent->parent();
0
1521-
1522 return
never executed: return parent;
parent;
never executed: return parent;
0
1523}-
1524-
1525static QRect getRelativeRect(QAccessibleInterface *interface)-
1526{-
1527 QAccessibleInterface * window;-
1528 QRect wr, cr;-
1529-
1530 cr = interface->rect();-
1531-
1532 window = getWindow(interface);-
1533 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1534 wr = window->rect();-
1535-
1536 cr.setX(cr.x() - wr.x());-
1537 cr.setY(cr.x() - wr.y());-
1538 }
never executed: end of block
0
1539 return
never executed: return cr;
cr;
never executed: return cr;
0
1540}-
1541-
1542bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
1543{-
1544 if (function == QLatin1String("Contains")
function == QL...ng("Contains")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1545 bool ret = false;-
1546 int x = message.arguments().at(0).toInt();-
1547 int y = message.arguments().at(1).toInt();-
1548 uint coordType = message.arguments().at(2).toUInt();-
1549 if (coordType == ATSPI_COORD_TYPE_SCREEN
coordType == A...RD_TYPE_SCREENDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1550 ret = interface->rect().contains(x, y);
never executed: ret = interface->rect().contains(x, y);
0
1551 else-
1552 ret = getRelativeRect(interface).contains(x, y);
never executed: ret = getRelativeRect(interface).contains(x, y);
0
1553 sendReply(connection, message, ret);-
1554 }
never executed: end of block
else if (function == QLatin1String("GetAccessibleAtPoint")
function == QL...sibleAtPoint")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1555 int x = message.arguments().at(0).toInt();-
1556 int y = message.arguments().at(1).toInt();-
1557 uint coordType = message.arguments().at(2).toUInt();-
1558 (void)coordType;-
1559-
1560 QAccessibleInterface * childInterface(interface->childAt(x, y));-
1561 QAccessibleInterface * iface = 0;-
1562 while (childInterface
childInterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1563 iface = childInterface;-
1564 childInterface = iface->childAt(x, y);-
1565 }
never executed: end of block
0
1566 if (iface
ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1567 QString path = pathForInterface(iface);-
1568 sendReply(connection, message, QVariant::fromValue(-
1569 QSpiObjectReference(connection, QDBusObjectPath(path))));-
1570 }
never executed: end of block
else {
0
1571 sendReply(connection, message, QVariant::fromValue(-
1572 QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/null"))));-
1573 }
never executed: end of block
0
1574 } else if (function == QLatin1String("GetAlpha")
function == QL...ng("GetAlpha")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1575 sendReply(connection, message, (double) 1.0);-
1576 }
never executed: end of block
else if (function == QLatin1String("GetExtents")
function == QL...("GetExtents")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1577 uint coordType = message.arguments().at(0).toUInt();-
1578 sendReply(connection, message, QVariant::fromValue(getExtents(interface, coordType)));-
1579 }
never executed: end of block
else if (function == QLatin1String("GetLayer")
function == QL...ng("GetLayer")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1580 sendReply(connection, message, QVariant::fromValue((uint)1));-
1581 }
never executed: end of block
else if (function == QLatin1String("GetMDIZOrder")
function == QL...GetMDIZOrder")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1582 sendReply(connection, message, QVariant::fromValue((short)0));-
1583 }
never executed: end of block
else if (function == QLatin1String("GetPosition")
function == QL..."GetPosition")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1584 uint coordType = message.arguments().at(0).toUInt();-
1585 QRect rect;-
1586 if (coordType == ATSPI_COORD_TYPE_SCREEN
coordType == A...RD_TYPE_SCREENDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1587 rect = interface->rect();
never executed: rect = interface->rect();
0
1588 else-
1589 rect = getRelativeRect(interface);
never executed: rect = getRelativeRect(interface);
0
1590 QVariantList pos;-
1591 pos << rect.x() << rect.y();-
1592 connection.send(message.createReply(pos));-
1593 }
never executed: end of block
else if (function == QLatin1String("GetSize")
function == QL...ing("GetSize")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1594 QRect rect = interface->rect();-
1595 QVariantList size;-
1596 size << rect.width() << rect.height();-
1597 connection.send(message.createReply(size));-
1598 }
never executed: end of block
else if (function == QLatin1String("GrabFocus")
function == QL...g("GrabFocus")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1599 QAccessibleActionInterface *actionIface = interface->actionInterface();-
1600 if (actionIface
actionIfaceDescription
TRUEnever evaluated
FALSEnever evaluated
&& actionIface->actionNames().contains(QAccessibleActionInterface::setFocusAction())
actionIface->a...FocusAction())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1601 actionIface->doAction(QAccessibleActionInterface::setFocusAction());-
1602 sendReply(connection, message, true);-
1603 }
never executed: end of block
else {
0
1604 sendReply(connection, message, false);-
1605 }
never executed: end of block
0
1606 } else if (function == QLatin1String("SetExtents")
function == QL...("SetExtents")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1607-
1608-
1609-
1610-
1611-
1612 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1672, __PRETTY_FUNCTION__).debug("SetExtents is not implemented.");
never executed: QMessageLogger(__FILE__, 1672, __PRETTY_FUNCTION__).debug("SetExtents is not implemented.");
0
1613 sendReply(connection, message, false);-
1614 }
never executed: end of block
else if (function == QLatin1String("SetPosition")
function == QL..."SetPosition")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1615-
1616-
1617-
1618 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1678, __PRETTY_FUNCTION__).debug("SetPosition is not implemented.");
never executed: QMessageLogger(__FILE__, 1678, __PRETTY_FUNCTION__).debug("SetPosition is not implemented.");
0
1619 sendReply(connection, message, false);-
1620 }
never executed: end of block
else if (function == QLatin1String("SetSize")
function == QL...ing("SetSize")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1621-
1622-
1623 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1683, __PRETTY_FUNCTION__).debug("SetSize is not implemented.");
never executed: QMessageLogger(__FILE__, 1683, __PRETTY_FUNCTION__).debug("SetSize is not implemented.");
0
1624 sendReply(connection, message, false);-
1625 }
never executed: end of block
else {
0
1626 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1686, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::componentInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 1686, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::componentInterface does not implement " << function << message.path();
0
1627 return
never executed: return false;
false;
never executed: return false;
0
1628 }-
1629 return
never executed: return true;
true;
never executed: return true;
0
1630}-
1631-
1632QRect AtSpiAdaptor::getExtents(QAccessibleInterface *interface, uint coordType)-
1633{-
1634 return
never executed: return (coordType == ATSPI_COORD_TYPE_SCREEN) ? interface->rect() : getRelativeRect(interface);
(coordType == ATSPI_COORD_TYPE_SCREEN) ? interface->rect() : getRelativeRect(interface);
never executed: return (coordType == ATSPI_COORD_TYPE_SCREEN) ? interface->rect() : getRelativeRect(interface);
0
1635}-
1636-
1637-
1638bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
1639{-
1640 if (function == QLatin1String("GetNActions")
function == QL..."GetNActions")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1641 int count = QAccessibleBridgeUtils::effectiveActionNames(interface).count();-
1642 sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(count))));-
1643 }
never executed: end of block
else if (function == QLatin1String("DoAction")
function == QL...ng("DoAction")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1644 int index = message.arguments().at(0).toInt();-
1645 const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface);-
1646 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| index >= actionNames.count()
index >= actionNames.count()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1647 return
never executed: return false;
false;
never executed: return false;
0
1648 const QString actionName = actionNames.at(index);-
1649 bool success = QAccessibleBridgeUtils::performEffectiveAction(interface, actionName);-
1650 sendReply(connection, message, success);-
1651 }
never executed: end of block
else if (function == QLatin1String("GetActions")
function == QL...("GetActions")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1652 sendReply(connection, message, QVariant::fromValue(getActions(interface)));-
1653 }
never executed: end of block
else if (function == QLatin1String("GetName")
function == QL...ing("GetName")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1654 int index = message.arguments().at(0).toInt();-
1655 const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface);-
1656 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| index >= actionNames.count()
index >= actionNames.count()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1657 return
never executed: return false;
false;
never executed: return false;
0
1658 sendReply(connection, message, actionNames.at(index));-
1659 }
never executed: end of block
else if (function == QLatin1String("GetDescription")
function == QL...tDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1660 int index = message.arguments().at(0).toInt();-
1661 const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface);-
1662 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| index >= actionNames.count()
index >= actionNames.count()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1663 return
never executed: return false;
false;
never executed: return false;
0
1664 QString description;-
1665 if (QAccessibleActionInterface *actionIface = interface->actionInterface()
QAccessibleAct...ionInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1666 description = actionIface->localizedActionDescription(actionNames.at(index));
never executed: description = actionIface->localizedActionDescription(actionNames.at(index));
0
1667 else-
1668 description = qAccessibleLocalizedActionDescription(actionNames.at(index));
never executed: description = qAccessibleLocalizedActionDescription(actionNames.at(index));
0
1669 sendReply(connection, message, description);-
1670 }
never executed: end of block
else if (function == QLatin1String("GetKeyBinding")
function == QL...etKeyBinding")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1671 int index = message.arguments().at(0).toInt();-
1672 const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface);-
1673 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| index >= actionNames.count()
index >= actionNames.count()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1674 return
never executed: return false;
false;
never executed: return false;
0
1675 QStringList keyBindings;-
1676 if (QAccessibleActionInterface *actionIface = interface->actionInterface()
QAccessibleAct...ionInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1677 keyBindings = actionIface->keyBindingsForAction(actionNames.at(index));
never executed: keyBindings = actionIface->keyBindingsForAction(actionNames.at(index));
0