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
1678 if (keyBindings.isEmpty()
keyBindings.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1679 QString acc = interface->text(QAccessible::Accelerator);-
1680 if (!acc.isEmpty()
!acc.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1681 keyBindings.append(acc);
never executed: keyBindings.append(acc);
0
1682 }
never executed: end of block
0
1683 if (keyBindings.length() > 0
keyBindings.length() > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1684 sendReply(connection, message, keyBindings.join(QLatin1Char(';')));
never executed: sendReply(connection, message, keyBindings.join(QLatin1Char(';')));
0
1685 else-
1686 sendReply(connection, message, QString());
never executed: sendReply(connection, message, QString());
0
1687 } else {-
1688 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1748, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::actionInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 1748, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::actionInterface does not implement " << function << message.path();
0
1689 return
never executed: return false;
false;
never executed: return false;
0
1690 }-
1691 return
never executed: return true;
true;
never executed: return true;
0
1692}-
1693-
1694QSpiActionArray AtSpiAdaptor::getActions(QAccessibleInterface *interface) const-
1695{-
1696 QAccessibleActionInterface *actionInterface = interface->actionInterface();-
1697 QSpiActionArray actions;-
1698 const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface);-
1699 actions.reserve(actionNames.size());-
1700 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(actionNames)>::type> _container_((actionNames)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &actionName = *_container_.i; _container_.control; _container_.control = 0) {-
1701 QSpiAction action;-
1702 QStringList keyBindings;-
1703-
1704 action.name = actionName;-
1705 if (actionInterface
actionInterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1706 action.description = actionInterface->localizedActionDescription(actionName);-
1707 keyBindings = actionInterface->keyBindingsForAction(actionName);-
1708 }
never executed: end of block
else {
0
1709 action.description = qAccessibleLocalizedActionDescription(actionName);-
1710 }
never executed: end of block
0
1711-
1712 if (keyBindings.length() > 0
keyBindings.length() > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1713 action.keyBinding = keyBindings[0];
never executed: action.keyBinding = keyBindings[0];
0
1714 else-
1715 action.keyBinding = QString();
never executed: action.keyBinding = QString();
0
1716-
1717 actions << action;-
1718 }
never executed: end of block
0
1719 return
never executed: return actions;
actions;
never executed: return actions;
0
1720}-
1721-
1722-
1723bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
1724{-
1725 if (!interface->textInterface()
!interface->textInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1726 return
never executed: return false;
false;
never executed: return false;
0
1727-
1728-
1729 if (function == QLatin1String("GetCaretOffset")
function == QL...tCaretOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1730 sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->cursorPosition()))));-
1731 }
never executed: end of block
else if (function == QLatin1String("GetCharacterCount")
function == QL...aracterCount")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1732 sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->characterCount()))));-
1733-
1734-
1735 }
never executed: end of block
else if (function == QLatin1String("AddSelection")
function == QL...AddSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1736 int startOffset = message.arguments().at(0).toInt();-
1737 int endOffset = message.arguments().at(1).toInt();-
1738 int lastSelection = interface->textInterface()->selectionCount();-
1739 interface->textInterface()->setSelection(lastSelection, startOffset, endOffset);-
1740 sendReply(connection, message, (interface->textInterface()->selectionCount() > lastSelection));-
1741 }
never executed: end of block
else if (function == QLatin1String("GetAttributeRun")
function == QL...AttributeRun")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1742 int offset = message.arguments().at(0).toInt();-
1743 bool includeDefaults = message.arguments().at(1).toBool();-
1744 (void)includeDefaults;-
1745 connection.send(message.createReply(getAttributes(interface, offset, includeDefaults)));-
1746 }
never executed: end of block
else if (function == QLatin1String("GetAttributeValue")
function == QL...tributeValue")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1747 int offset = message.arguments().at(0).toInt();-
1748 QString attributeName = message.arguments().at(1).toString();-
1749 connection.send(message.createReply(getAttributeValue(interface, offset, attributeName)));-
1750 }
never executed: end of block
else if (function == QLatin1String("GetAttributes")
function == QL...etAttributes")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1751 int offset = message.arguments().at(0).toInt();-
1752 connection.send(message.createReply(getAttributes(interface, offset, true)));-
1753 }
never executed: end of block
else if (function == QLatin1String("GetBoundedRanges")
function == QL...oundedRanges")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1754 int x = message.arguments().at(0).toInt();-
1755 int y = message.arguments().at(1).toInt();-
1756 int width = message.arguments().at(2).toInt();-
1757 int height = message.arguments().at(3).toInt();-
1758 uint coordType = message.arguments().at(4).toUInt();-
1759 uint xClipType = message.arguments().at(5).toUInt();-
1760 uint yClipType = message.arguments().at(6).toUInt();-
1761 (void)x; (void)y; (void)width;-
1762 (void)height; (void)coordType;-
1763 (void)xClipType; (void)yClipType;-
1764 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1824, __PRETTY_FUNCTION__).debug("Not implemented: QSpiAdaptor::GetBoundedRanges");
never executed: QMessageLogger(__FILE__, 1824, __PRETTY_FUNCTION__).debug("Not implemented: QSpiAdaptor::GetBoundedRanges");
0
1765 sendReply(connection, message, QVariant::fromValue(QSpiTextRangeList()));-
1766 }
never executed: end of block
else if (function == QLatin1String("GetCharacterAtOffset")
function == QL...cterAtOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1767 int offset = message.arguments().at(0).toInt();-
1768 int start;-
1769 int end;-
1770 QString result = interface->textInterface()->textAtOffset(offset, QAccessible::CharBoundary, &start, &end);-
1771 sendReply(connection, message, (int) *(QString(result).toLocal8Bit().constData()));-
1772 }
never executed: end of block
else if (function == QLatin1String("GetCharacterExtents")
function == QL...acterExtents")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1773 int offset = message.arguments().at(0).toInt();-
1774 int coordType = message.arguments().at(1).toUInt();-
1775 connection.send(message.createReply(getCharacterExtents(interface, offset, coordType)));-
1776 }
never executed: end of block
else if (function == QLatin1String("GetDefaultAttributeSet")
function == QL...AttributeSet")Description
TRUEnever evaluated
FALSEnever evaluated
|| function == QLatin1String("GetDefaultAttributes")
function == QL...ltAttributes")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1777-
1778-
1779 sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet()));-
1780 }
never executed: end of block
else if (function == QLatin1String("GetNSelections")
function == QL...tNSelections")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1781 sendReply(connection, message, interface->textInterface()->selectionCount());-
1782 }
never executed: end of block
else if (function == QLatin1String("GetOffsetAtPoint")
function == QL...ffsetAtPoint")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1783 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1843, __PRETTY_FUNCTION__).debug() << message.signature();
never executed: QMessageLogger(__FILE__, 1843, __PRETTY_FUNCTION__).debug() << message.signature();
0
1784 ((!(!message.signature().isEmpty())) ? qt_assert("!message.signature().isEmpty()",__FILE__,1844) : qt_noop());-
1785 QPoint point(message.arguments().at(0).toInt(), message.arguments().at(1).toInt());-
1786 uint coordType = message.arguments().at(2).toUInt();-
1787 if (coordType == ATSPI_COORD_TYPE_WINDOW
coordType == A...RD_TYPE_WINDOWDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1788 QWindow *win = interface->window();-
1789 point -= QPoint(win->x(), win->y());-
1790 }
never executed: end of block
0
1791 int offset = interface->textInterface()->offsetAtPoint(point);-
1792 sendReply(connection, message, offset);-
1793 }
never executed: end of block
else if (function == QLatin1String("GetRangeExtents")
function == QL...RangeExtents")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1794 int startOffset = message.arguments().at(0).toInt();-
1795 int endOffset = message.arguments().at(1).toInt();-
1796 uint coordType = message.arguments().at(2).toUInt();-
1797 connection.send(message.createReply(getRangeExtents(interface, startOffset, endOffset, coordType)));-
1798 }
never executed: end of block
else if (function == QLatin1String("GetSelection")
function == QL...GetSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1799 int selectionNum = message.arguments().at(0).toInt();-
1800 int start, end;-
1801 interface->textInterface()->selection(selectionNum, &start, &end);-
1802 if (start < 0
start < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1803 start = end = interface->textInterface()->cursorPosition();
never executed: start = end = interface->textInterface()->cursorPosition();
0
1804 QVariantList sel;-
1805 sel << start << end;-
1806 connection.send(message.createReply(sel));-
1807 }
never executed: end of block
else if (function == QLatin1String("GetText")
function == QL...ing("GetText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1808 int startOffset = message.arguments().at(0).toInt();-
1809 int endOffset = message.arguments().at(1).toInt();-
1810 if (endOffset == -1
endOffset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1811 endOffset = interface->textInterface()->characterCount();
never executed: endOffset = interface->textInterface()->characterCount();
0
1812 sendReply(connection, message, interface->textInterface()->text(startOffset, endOffset));-
1813 }
never executed: end of block
else if (function == QLatin1String("GetTextAfterOffset")
function == QL...tAfterOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1814 int offset = message.arguments().at(0).toInt();-
1815 int type = message.arguments().at(1).toUInt();-
1816 int startOffset, endOffset;-
1817 QString text = interface->textInterface()->textAfterOffset(offset, qAccessibleBoundaryType(type), &startOffset, &endOffset);-
1818 QVariantList ret;-
1819 ret << text << startOffset << endOffset;-
1820 connection.send(message.createReply(ret));-
1821 }
never executed: end of block
else if (function == QLatin1String("GetTextAtOffset")
function == QL...TextAtOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1822 int offset = message.arguments().at(0).toInt();-
1823 int type = message.arguments().at(1).toUInt();-
1824 int startOffset, endOffset;-
1825 QString text = interface->textInterface()->textAtOffset(offset, qAccessibleBoundaryType(type), &startOffset, &endOffset);-
1826 QVariantList ret;-
1827 ret << text << startOffset << endOffset;-
1828 connection.send(message.createReply(ret));-
1829 }
never executed: end of block
else if (function == QLatin1String("GetTextBeforeOffset")
function == QL...BeforeOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1830 int offset = message.arguments().at(0).toInt();-
1831 int type = message.arguments().at(1).toUInt();-
1832 int startOffset, endOffset;-
1833 QString text = interface->textInterface()->textBeforeOffset(offset, qAccessibleBoundaryType(type), &startOffset, &endOffset);-
1834 QVariantList ret;-
1835 ret << text << startOffset << endOffset;-
1836 connection.send(message.createReply(ret));-
1837 }
never executed: end of block
else if (function == QLatin1String("RemoveSelection")
function == QL...oveSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1838 int selectionNum = message.arguments().at(0).toInt();-
1839 interface->textInterface()->removeSelection(selectionNum);-
1840 sendReply(connection, message, true);-
1841 }
never executed: end of block
else if (function == QLatin1String("SetCaretOffset")
function == QL...tCaretOffset")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1842 int offset = message.arguments().at(0).toInt();-
1843 interface->textInterface()->setCursorPosition(offset);-
1844 sendReply(connection, message, true);-
1845 }
never executed: end of block
else if (function == QLatin1String("SetSelection")
function == QL...SetSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1846 int selectionNum = message.arguments().at(0).toInt();-
1847 int startOffset = message.arguments().at(1).toInt();-
1848 int endOffset = message.arguments().at(2).toInt();-
1849 interface->textInterface()->setSelection(selectionNum, startOffset, endOffset);-
1850 sendReply(connection, message, true);-
1851 }
never executed: end of block
else {
0
1852 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1912, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::textInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 1912, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::textInterface does not implement " << function << message.path();
0
1853 return
never executed: return false;
false;
never executed: return false;
0
1854 }-
1855 return
never executed: return true;
true;
never executed: return true;
0
1856}-
1857-
1858QAccessible::TextBoundaryType AtSpiAdaptor::qAccessibleBoundaryType(int atspiTextBoundaryType) const-
1859{-
1860 switch (atspiTextBoundaryType) {-
1861 case
never executed: case ATSPI_TEXT_BOUNDARY_CHAR:
ATSPI_TEXT_BOUNDARY_CHAR:
never executed: case ATSPI_TEXT_BOUNDARY_CHAR:
0
1862 return
never executed: return QAccessible::CharBoundary;
QAccessible::CharBoundary;
never executed: return QAccessible::CharBoundary;
0
1863 case
never executed: case ATSPI_TEXT_BOUNDARY_WORD_START:
ATSPI_TEXT_BOUNDARY_WORD_START:
never executed: case ATSPI_TEXT_BOUNDARY_WORD_START:
0
1864 case
never executed: case ATSPI_TEXT_BOUNDARY_WORD_END:
ATSPI_TEXT_BOUNDARY_WORD_END:
never executed: case ATSPI_TEXT_BOUNDARY_WORD_END:
0
1865 return
never executed: return QAccessible::WordBoundary;
QAccessible::WordBoundary;
never executed: return QAccessible::WordBoundary;
0
1866 case
never executed: case ATSPI_TEXT_BOUNDARY_SENTENCE_START:
ATSPI_TEXT_BOUNDARY_SENTENCE_START:
never executed: case ATSPI_TEXT_BOUNDARY_SENTENCE_START:
0
1867 case
never executed: case ATSPI_TEXT_BOUNDARY_SENTENCE_END:
ATSPI_TEXT_BOUNDARY_SENTENCE_END:
never executed: case ATSPI_TEXT_BOUNDARY_SENTENCE_END:
0
1868 return
never executed: return QAccessible::SentenceBoundary;
QAccessible::SentenceBoundary;
never executed: return QAccessible::SentenceBoundary;
0
1869 case
never executed: case ATSPI_TEXT_BOUNDARY_LINE_START:
ATSPI_TEXT_BOUNDARY_LINE_START:
never executed: case ATSPI_TEXT_BOUNDARY_LINE_START:
0
1870 case
never executed: case ATSPI_TEXT_BOUNDARY_LINE_END:
ATSPI_TEXT_BOUNDARY_LINE_END:
never executed: case ATSPI_TEXT_BOUNDARY_LINE_END:
0
1871 return
never executed: return QAccessible::LineBoundary;
QAccessible::LineBoundary;
never executed: return QAccessible::LineBoundary;
0
1872 }-
1873 ((!(0)) ? qt_assert_x("", "Requested invalid boundary type.",__FILE__,1933) : qt_noop());-
1874 return
never executed: return QAccessible::CharBoundary;
QAccessible::CharBoundary;
never executed: return QAccessible::CharBoundary;
0
1875}-
1876-
1877namespace-
1878{-
1879 struct AtSpiAttribute {-
1880 QString name;-
1881 QString value;-
1882 AtSpiAttribute(const QString &aName, const QString &aValue) : name(aName), value(aValue) {}
never executed: end of block
0
1883 bool isNull() const { return
never executed: return name.isNull() || value.isNull();
name.isNull() || value.isNull();
never executed: return name.isNull() || value.isNull();
}
0
1884 };-
1885-
1886 QString atspiColor(const QString &ia2Color)-
1887 {-
1888-
1889 return
never executed: return ia2Color.mid(4, ia2Color.length() - (4+1));
ia2Color.mid(4, ia2Color.length() - (4+1));
never executed: return ia2Color.mid(4, ia2Color.length() - (4+1));
0
1890 }-
1891-
1892 QString atspiSize(const QString &ia2Size)-
1893 {-
1894-
1895 return
never executed: return ia2Size.left(ia2Size.length() - 2);
ia2Size.left(ia2Size.length() - 2);
never executed: return ia2Size.left(ia2Size.length() - 2);
0
1896 }-
1897-
1898 AtSpiAttribute atspiTextAttribute(const QString &ia2Name, const QString &ia2Value)-
1899 {-
1900 QString name = ia2Name;-
1901 QString value = ia2Value;-
1902 if (ia2Name == QLatin1String("background-color")
ia2Name == QLa...ground-color")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1903 name = ([]() -> QString { enum { Size = sizeof(u"" "bg-color")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "bg-color" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1904 value = atspiColor(value);-
1905 }
never executed: end of block
else if (ia2Name == QLatin1String("font-family")
ia2Name == QLa..."font-family")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1906 name = ([]() -> QString { enum { Size = sizeof(u"" "family-name")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "family-name" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1907 }
never executed: end of block
else if (ia2Name == QLatin1String("color")
ia2Name == QLa...tring("color")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1908 name = ([]() -> QString { enum { Size = sizeof(u"" "fg-color")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fg-color" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1909 value = atspiColor(value);-
1910 }
never executed: end of block
else if (ia2Name == QLatin1String("text-align")
ia2Name == QLa...("text-align")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1911 name = ([]() -> QString { enum { Size = sizeof(u"" "justification")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "justification" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1912 if (value == QLatin1String("justify")
value == QLati...ing("justify")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1913 value = ([]() -> QString { enum { Size = sizeof(u"" "fill")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fill" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1914 }
never executed: end of block
else {
0
1915 if (value != QLatin1String("left")
value != QLatin1String("left")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1916 value != QLatin1String("right")
value != QLati...tring("right")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1917 value != QLatin1String("center")
value != QLati...ring("center")Description
TRUEnever evaluated
FALSEnever evaluated
0
1918 ) {-
1919 value = QString();-
1920 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 1988, __PRETTY_FUNCTION__).debug() << "Unknown text-align attribute value \"" << value << "\" cannot be translated to AT-SPI.";
never executed: QMessageLogger(__FILE__, 1988, __PRETTY_FUNCTION__).debug() << "Unknown text-align attribute value \"" << value << "\" cannot be translated to AT-SPI.";
0
1921 }-
1922 }
never executed: end of block
0
1923 } else if (ia2Name == QLatin1String("font-size")
ia2Name == QLa...g("font-size")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1924 name = ([]() -> QString { enum { Size = sizeof(u"" "size")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "size" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1925 value = atspiSize(value);-
1926 }
never executed: end of block
else if (ia2Name == QLatin1String("font-style")
ia2Name == QLa...("font-style")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1927 name = ([]() -> QString { enum { Size = sizeof(u"" "style")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "style" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1928 if (value != QLatin1String("normal")
value != QLati...ring("normal")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1929 value != QLatin1String("italic")
value != QLati...ring("italic")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1930 value != QLatin1String("oblique")
value != QLati...ing("oblique")Description
TRUEnever evaluated
FALSEnever evaluated
0
1931 ) {-
1932 value = QString();-
1933 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2001, __PRETTY_FUNCTION__).debug() << "Unknown font-style attribute value \"" << value << "\" cannot be translated to AT-SPI.";
never executed: QMessageLogger(__FILE__, 2001, __PRETTY_FUNCTION__).debug() << "Unknown font-style attribute value \"" << value << "\" cannot be translated to AT-SPI.";
0
1934 }-
1935 }
never executed: end of block
else if (ia2Name == QLatin1String("text-underline-type")
ia2Name == QLa...derline-type")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1936 name = ([]() -> QString { enum { Size = sizeof(u"" "underline")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "underline" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1937 if (value != QLatin1String("none")
value != QLatin1String("none")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1938 value != QLatin1String("single")
value != QLati...ring("single")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1939 value != QLatin1String("double")
value != QLati...ring("double")Description
TRUEnever evaluated
FALSEnever evaluated
0
1940 ) {-
1941 value = QString();-
1942 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2010, __PRETTY_FUNCTION__).debug() << "Unknown text-underline-type attribute value \"" << value << "\" cannot be translated to AT-SPI.";
never executed: QMessageLogger(__FILE__, 2010, __PRETTY_FUNCTION__).debug() << "Unknown text-underline-type attribute value \"" << value << "\" cannot be translated to AT-SPI.";
0
1943 }-
1944 }
never executed: end of block
else if (ia2Name == QLatin1String("font-weight")
ia2Name == QLa..."font-weight")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1945 name = ([]() -> QString { enum { Size = sizeof(u"" "weight")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "weight" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1946 if (value == QLatin1String("normal")
value == QLati...ring("normal")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1947-
1948-
1949-
1950 value = QString();
never executed: value = QString();
0
1951 }
never executed: end of block
else if (ia2Name == QLatin1String("text-position")
ia2Name == QLa...ext-position")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1952 name = ([]() -> QString { enum { Size = sizeof(u"" "vertical-align")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "vertical-align" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1953 if (value != QLatin1String("baseline")
value != QLati...ng("baseline")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1954 value != QLatin1String("super")
value != QLati...tring("super")Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1955 value != QLatin1String("sub")
value != QLatin1String("sub")Description
TRUEnever evaluated
FALSEnever evaluated
0
1956 ) {-
1957 value = QString();-
1958 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2026, __PRETTY_FUNCTION__).debug() << "Unknown text-position attribute value \"" << value << "\" cannot be translated to AT-SPI.";
never executed: QMessageLogger(__FILE__, 2026, __PRETTY_FUNCTION__).debug() << "Unknown text-position attribute value \"" << value << "\" cannot be translated to AT-SPI.";
0
1959 }-
1960 }
never executed: end of block
else if (ia2Name == QLatin1String("writing-mode")
ia2Name == QLa...writing-mode")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1961 name = ([]() -> QString { enum { Size = sizeof(u"" "direction")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "direction" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1962 if (value == QLatin1String("lr")
value == QLatin1String("lr")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1963 value = ([]() -> QString { enum { Size = sizeof(u"" "ltr")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ltr" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: value = ([]() -> QString { enum { Size = sizeof(u"" "ltr")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ltr" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
1964 else if (value == QLatin1String("rl")
value == QLatin1String("rl")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1965 value = ([]() -> QString { enum { Size = sizeof(u"" "rtl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rtl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: value = ([]() -> QString { enum { Size = sizeof(u"" "rtl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rtl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
1966 else if (value == QLatin1String("tb")
value == QLatin1String("tb")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1967-
1968 value = ([]() -> QString { enum { Size = sizeof(u"" "rtl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rtl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
1969 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2037, __PRETTY_FUNCTION__).debug() << "writing-mode attribute value \"tb\" translated only w.r.t. horizontal direction; vertical direction ignored";
never executed: QMessageLogger(__FILE__, 2037, __PRETTY_FUNCTION__).debug() << "writing-mode attribute value \"tb\" translated only w.r.t. horizontal direction; vertical direction ignored";
0
1970 } else {-
1971 value = QString();-
1972 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2040, __PRETTY_FUNCTION__).debug() << "Unknown writing-mode attribute value \"" << value << "\" cannot be translated to AT-SPI.";
never executed: QMessageLogger(__FILE__, 2040, __PRETTY_FUNCTION__).debug() << "Unknown writing-mode attribute value \"" << value << "\" cannot be translated to AT-SPI.";
0
1973 }-
1974 } else if (ia2Name == QLatin1String("language")
ia2Name == QLa...ng("language")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1975-
1976 }
never executed: end of block
else if (ia2Name == QLatin1String("invalid")
ia2Name == QLa...ing("invalid")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1977-
1978 }
never executed: end of block
else {
0
1979-
1980 name = QString();-
1981 value = QString();-
1982 }
never executed: end of block
0
1983 return
never executed: return AtSpiAttribute(name, value);
AtSpiAttribute(name, value);
never executed: return AtSpiAttribute(name, value);
0
1984 }-
1985}-
1986-
1987-
1988QVariantList AtSpiAdaptor::getAttributes(QAccessibleInterface *interface, int offset, bool includeDefaults) const-
1989{-
1990 (void)includeDefaults;;-
1991-
1992 QSpiAttributeSet set;-
1993 int startOffset;-
1994 int endOffset;-
1995-
1996 QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);-
1997 QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);-
1998 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(attributes)>::type> _container_((attributes)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &attr = *_container_.i; _container_.control; _container_.control = 0) {-
1999 QStringList items;-
2000 items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);-
2001 AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);-
2002 if (!attribute.isNull()
!attribute.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2003 set[
never executed: set[attribute.name] = attribute.value;
attribute.name] = attribute.value;
never executed: set[attribute.name] = attribute.value;
0
2004 }
never executed: end of block
0
2005-
2006 QVariantList list;-
2007 list << QVariant::fromValue(set) << startOffset << endOffset;-
2008-
2009 return
never executed: return list;
list;
never executed: return list;
0
2010}-
2011-
2012QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, int offset, const QString &attributeName) const-
2013{-
2014 QString mapped;-
2015 QString joined;-
2016 QStringList attributes;-
2017 QSpiAttributeSet map;-
2018 int startOffset;-
2019 int endOffset;-
2020-
2021 joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);-
2022 attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);-
2023 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(attributes)>::type> _container_((attributes)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString& attr = *_container_.i; _container_.control; _container_.control = 0) {-
2024 QStringList items;-
2025 items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);-
2026 AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);-
2027 if (!attribute.isNull()
!attribute.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2028 map[attribute.name] = attribute.value;
never executed: map[attribute.name] = attribute.value;
0
2029 }
never executed: end of block
0
2030 mapped = map[attributeName];-
2031 const bool defined = !mapped.isEmpty();-
2032 QVariantList list;-
2033 list << mapped << startOffset << endOffset << defined;-
2034 return
never executed: return list;
list;
never executed: return list;
0
2035}-
2036-
2037QList<QVariant> AtSpiAdaptor::getCharacterExtents(QAccessibleInterface *interface, int offset, uint coordType) const-
2038{-
2039 QRect rect = interface->textInterface()->characterRect(offset);-
2040-
2041 if (coordType == ATSPI_COORD_TYPE_WINDOW
coordType == A...RD_TYPE_WINDOWDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2042 rect = translateRectToWindowCoordinates(interface, rect);
never executed: rect = translateRectToWindowCoordinates(interface, rect);
0
2043-
2044 return
never executed: return QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
never executed: return QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
0
2045}-
2046-
2047QList<QVariant> AtSpiAdaptor::getRangeExtents(QAccessibleInterface *interface,-
2048 int startOffset, int endOffset, uint coordType) const-
2049{-
2050 if (endOffset == -1
endOffset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2051 endOffset = interface->textInterface()->characterCount();
never executed: endOffset = interface->textInterface()->characterCount();
0
2052-
2053 QAccessibleTextInterface *textInterface = interface->textInterface();-
2054 if (endOffset <= startOffset
endOffset <= startOffsetDescription
TRUEnever evaluated
FALSEnever evaluated
|| !textInterface
!textInterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2055 return
never executed: return QList<QVariant>() << -1 << -1 << 0 << 0;
QList<QVariant>() << -1 << -1 << 0 << 0;
never executed: return QList<QVariant>() << -1 << -1 << 0 << 0;
0
2056-
2057 QRect rect = textInterface->characterRect(startOffset);-
2058 for (int i=startOffset + 1; i <= endOffset
i <= endOffsetDescription
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
2059 rect = rect | textInterface->characterRect(i);
never executed: rect = rect | textInterface->characterRect(i);
0
2060-
2061-
2062 if (coordType == ATSPI_COORD_TYPE_WINDOW
coordType == A...RD_TYPE_WINDOWDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2063 rect = translateRectToWindowCoordinates(interface, rect);
never executed: rect = translateRectToWindowCoordinates(interface, rect);
0
2064-
2065 return
never executed: return QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
never executed: return QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();
0
2066}-
2067-
2068QRect AtSpiAdaptor::translateRectToWindowCoordinates(QAccessibleInterface *interface, const QRect &rect)-
2069{-
2070 QAccessibleInterface * window = getWindow(interface);-
2071 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2072 return
never executed: return rect.translated(-window->rect().x(), -window->rect().y());
rect.translated(-window->rect().x(), -window->rect().y());
never executed: return rect.translated(-window->rect().x(), -window->rect().y());
0
2073-
2074 return
never executed: return rect;
rect;
never executed: return rect;
0
2075}-
2076-
2077-
2078-
2079static QString textForRange(QAccessibleInterface *accessible, int startOffset, int endOffset)-
2080{-
2081 if (QAccessibleTextInterface *textIface = accessible->textInterface()
QAccessibleTex...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2082 if (endOffset == -1
endOffset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2083 endOffset = textIface->characterCount();
never executed: endOffset = textIface->characterCount();
0
2084 return
never executed: return textIface->text(startOffset, endOffset);
textIface->text(startOffset, endOffset);
never executed: return textIface->text(startOffset, endOffset);
0
2085 }-
2086 QString txt = accessible->text(QAccessible::Value);-
2087 if (endOffset == -1
endOffset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2088 endOffset = txt.length();
never executed: endOffset = txt.length();
0
2089 return
never executed: return txt.mid(startOffset, endOffset - startOffset);
txt.mid(startOffset, endOffset - startOffset);
never executed: return txt.mid(startOffset, endOffset - startOffset);
0
2090}-
2091-
2092static void replaceTextFallback(QAccessibleInterface *accessible, long startOffset, long endOffset, const QString &txt)-
2093{-
2094 QString t = textForRange(accessible, 0, -1);-
2095 if (endOffset == -1
endOffset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2096 endOffset = t.length();
never executed: endOffset = t.length();
0
2097 if (endOffset - startOffset == 0
endOffset - startOffset == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2098 t.insert(startOffset, txt);
never executed: t.insert(startOffset, txt);
0
2099 else-
2100 t.replace(startOffset, endOffset - startOffset, txt);
never executed: t.replace(startOffset, endOffset - startOffset, txt);
0
2101 accessible->setText(QAccessible::Value, t);-
2102}
never executed: end of block
0
2103-
2104bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
2105{-
2106 if (function == QLatin1String("CopyText")
function == QL...ng("CopyText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2107-
2108 int startOffset = message.arguments().at(0).toInt();-
2109 int endOffset = message.arguments().at(1).toInt();-
2110 const QString t = textForRange(interface, startOffset, endOffset);-
2111 QGuiApplication::clipboard()->setText(t);-
2112-
2113 connection.send(message.createReply(true));-
2114 }
never executed: end of block
else if (function == QLatin1String("CutText")
function == QL...ing("CutText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2115-
2116 int startOffset = message.arguments().at(0).toInt();-
2117 int endOffset = message.arguments().at(1).toInt();-
2118 const QString t = textForRange(interface, startOffset, endOffset);-
2119 if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
QAccessibleEdi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2120 editableTextIface->deleteText(startOffset, endOffset);
never executed: editableTextIface->deleteText(startOffset, endOffset);
0
2121 else-
2122 replaceTextFallback(interface, startOffset, endOffset, QString());
never executed: replaceTextFallback(interface, startOffset, endOffset, QString());
0
2123 QGuiApplication::clipboard()->setText(t);-
2124-
2125 connection.send(message.createReply(true));-
2126 }
never executed: end of block
else if (function == QLatin1String("DeleteText")
function == QL...("DeleteText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2127 int startOffset = message.arguments().at(0).toInt();-
2128 int endOffset = message.arguments().at(1).toInt();-
2129 if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
QAccessibleEdi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2130 editableTextIface->deleteText(startOffset, endOffset);
never executed: editableTextIface->deleteText(startOffset, endOffset);
0
2131 else-
2132 replaceTextFallback(interface, startOffset, endOffset, QString());
never executed: replaceTextFallback(interface, startOffset, endOffset, QString());
0
2133 connection.send(message.createReply(true));-
2134 }
never executed: end of block
else if (function == QLatin1String("InsertText")
function == QL...("InsertText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2135 int position = message.arguments().at(0).toInt();-
2136 QString text = message.arguments().at(1).toString();-
2137 int length = message.arguments().at(2).toInt();-
2138 text.resize(length);-
2139 if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
QAccessibleEdi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2140 editableTextIface->insertText(position, text);
never executed: editableTextIface->insertText(position, text);
0
2141 else-
2142 replaceTextFallback(interface, position, position, text);
never executed: replaceTextFallback(interface, position, position, text);
0
2143 connection.send(message.createReply(true));-
2144 }
never executed: end of block
else if (function == QLatin1String("PasteText")
function == QL...g("PasteText")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2145-
2146 int position = message.arguments().at(0).toInt();-
2147 const QString txt = QGuiApplication::clipboard()->text();-
2148 if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
QAccessibleEdi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2149 editableTextIface->insertText(position, txt);
never executed: editableTextIface->insertText(position, txt);
0
2150 else-
2151 replaceTextFallback(interface, position, position, txt);
never executed: replaceTextFallback(interface, position, position, txt);
0
2152-
2153 connection.send(message.createReply(true));-
2154 }
never executed: end of block
else if (function == QLatin1String("SetTextContents")
function == QL...TextContents")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2155 QString newContents = message.arguments().at(0).toString();-
2156 if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
QAccessibleEdi...extInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2157 editableTextIface->replaceText(0, interface->textInterface()->characterCount(), newContents);
never executed: editableTextIface->replaceText(0, interface->textInterface()->characterCount(), newContents);
0
2158 else-
2159 replaceTextFallback(interface, 0, -1, newContents);
never executed: replaceTextFallback(interface, 0, -1, newContents);
0
2160 connection.send(message.createReply(true));-
2161 }
never executed: end of block
else if (function == QLatin1String("")
function == QLatin1String("")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2162 connection.send(message.createReply());-
2163 }
never executed: end of block
else {
0
2164 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2232, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::editableTextInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 2232, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::editableTextInterface does not implement " << function << message.path();
0
2165 return
never executed: return false;
false;
never executed: return false;
0
2166 }-
2167 return
never executed: return true;
true;
never executed: return true;
0
2168}-
2169-
2170-
2171bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
2172{-
2173 QAccessibleValueInterface *valueIface = interface->valueInterface();-
2174 if (!valueIface
!valueIfaceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2175 return
never executed: return false;
false;
never executed: return false;
0
2176-
2177 if (function == QLatin1String("SetCurrentValue")
function == QL...CurrentValue")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2178 QDBusVariant v = message.arguments().at(2).value<QDBusVariant>();-
2179 double value = v.variant().toDouble();-
2180-
2181-
2182 valueIface->setCurrentValue(value);-
2183 connection.send(message.createReply());-
2184 }
never executed: end of block
else {
0
2185 QVariant value;-
2186 if (function == QLatin1String("GetCurrentValue")
function == QL...CurrentValue")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2187 value = valueIface->currentValue();
never executed: value = valueIface->currentValue();
0
2188 else if (function == QLatin1String("GetMaximumValue")
function == QL...MaximumValue")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2189 value = valueIface->maximumValue();
never executed: value = valueIface->maximumValue();
0
2190 else if (function == QLatin1String("GetMinimumIncrement")
function == QL...mumIncrement")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2191 value = valueIface->minimumStepSize();
never executed: value = valueIface->minimumStepSize();
0
2192 else if (function == QLatin1String("GetMinimumValue")
function == QL...MinimumValue")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2193 value = valueIface->minimumValue();
never executed: value = valueIface->minimumValue();
0
2194 else {-
2195 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2263, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 2263, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();
0
2196 return
never executed: return false;
false;
never executed: return false;
0
2197 }-
2198 if (!value.canConvert(QVariant::Double)
!value.canConv...riant::Double)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2199 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2267, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::valueInterface: Could not convert to double: " << function;
never executed: QMessageLogger(__FILE__, 2267, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::valueInterface: Could not convert to double: " << function;
0
2200 }-
2201-
2202-
2203-
2204 connection.send(message.createReply(-
2205 QVariant::fromValue(QDBusVariant(QVariant::fromValue(value.toDouble())))));-
2206 }
never executed: end of block
0
2207 return
never executed: return true;
true;
never executed: return true;
0
2208}-
2209-
2210-
2211bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)-
2212{-
2213 if (!(interface->
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
tableInterface()
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
|| interface->
interface->tab...ellInterface()Description
TRUEnever evaluated
FALSEnever evaluated
tableCellInterface()
interface->tab...ellInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
2214 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2282, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find table interface for: " << message.path() << interface;
never executed: QMessageLogger(__FILE__, 2282, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find table interface for: " << message.path() << interface;
0
2215 return
never executed: return false;
false;
never executed: return false;
0
2216 }-
2217-
2218 if (0) {
dead code: { }
-
2219-
2220 }
dead code: { }
else if (function == QLatin1String("GetCaption")
function == QL...("GetCaption")Description
TRUEnever evaluated
FALSEnever evaluated
) {
-
2221 QAccessibleInterface * captionInterface= interface->tableInterface()->caption();-
2222 if (captionInterface
captionInterfaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2223 QSpiObjectReference ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(captionInterface)));-
2224 sendReply(connection, message, QVariant::fromValue(ref));-
2225 }
never executed: end of block
else {
0
2226 sendReply(connection, message, QVariant::fromValue(-
2227 QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/null"))));-
2228 }
never executed: end of block
0
2229 } else if (function == QLatin1String("GetNColumns")
function == QL..."GetNColumns")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2230 connection.send(message.createReply(QVariant::fromValue(QDBusVariant(-
2231 QVariant::fromValue(interface->tableInterface()->columnCount())))));-
2232 }
never executed: end of block
else if (function == QLatin1String("GetNRows")
function == QL...ng("GetNRows")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2233 connection.send(message.createReply(QVariant::fromValue(QDBusVariant(-
2234 QVariant::fromValue(interface->tableInterface()->rowCount())))));-
2235 }
never executed: end of block
else if (function == QLatin1String("GetNSelectedColumns")
function == QL...ectedColumns")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2236 connection.send(message.createReply(QVariant::fromValue(QDBusVariant(-
2237 QVariant::fromValue(interface->tableInterface()->selectedColumnCount())))));-
2238 }
never executed: end of block
else if (function == QLatin1String("GetNSelectedRows")
function == QL...SelectedRows")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2239 connection.send(message.createReply(QVariant::fromValue(QDBusVariant(-
2240 QVariant::fromValue(interface->tableInterface()->selectedRowCount())))));-
2241 }
never executed: end of block
else if (function == QLatin1String("GetSummary")
function == QL...("GetSummary")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2242 QAccessibleInterface * summary = interface->
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
tableInterface()
interface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
? interface->tableInterface()->summary() : 0;
0
2243 QSpiObjectReference ref(connection, QDBusObjectPath(pathForInterface(summary)));-
2244 connection.send(message.createReply(QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref)))));-
2245 }
never executed: end of block
else if (function == QLatin1String("GetAccessibleAt")
function == QL...AccessibleAt")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2246 int row = message.arguments().at(0).toInt();-
2247 int column = message.arguments().at(1).toInt();-
2248 if ((
(row < 0)Description
TRUEnever evaluated
FALSEnever evaluated
row < 0)
(row < 0)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
2249 (
(column < 0)Description
TRUEnever evaluated
FALSEnever evaluated
column < 0)
(column < 0)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
2250 (
(row >= interf...)->rowCount())Description
TRUEnever evaluated
FALSEnever evaluated
row >= interface->tableInterface()->rowCount())
(row >= interf...)->rowCount())Description
TRUEnever evaluated
FALSEnever evaluated
||
0
2251 (
(column >= int...columnCount())Description
TRUEnever evaluated
FALSEnever evaluated
column >= interface->tableInterface()->columnCount())
(column >= int...columnCount())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2252 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2320, __PRETTY_FUNCTION__).debug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ')';
never executed: QMessageLogger(__FILE__, 2320, __PRETTY_FUNCTION__).debug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ')';
0
2253 return
never executed: return false;
false;
never executed: return false;
0
2254 }-
2255-
2256 QSpiObjectReference ref;-
2257 QAccessibleInterface * cell(interface->tableInterface()->cellAt(row, column));-
2258 if (cell
cellDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2259 ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(cell)));-
2260 }
never executed: end of block
else {
0
2261 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2329, __PRETTY_FUNCTION__).debug() << "WARNING: no cell interface returned for " << interface->object() << row << column;
never executed: QMessageLogger(__FILE__, 2329, __PRETTY_FUNCTION__).debug() << "WARNING: no cell interface returned for " << interface->object() << row << column;
0
2262 ref = QSpiObjectReference();-
2263 }
never executed: end of block
0
2264 connection.send(message.createReply(QVariant::fromValue(ref)));-
2265-
2266 }
never executed: end of block
else if (function == QLatin1String("GetIndexAt")
function == QL...("GetIndexAt")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2267 int row = message.arguments().at(0).toInt();-
2268 int column = message.arguments().at(1).toInt();-
2269 QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column);-
2270 if (!cell
!cellDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2271 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2339, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << ',' << column << ") did not find a cell. " << interface;
never executed: QMessageLogger(__FILE__, 2339, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << ',' << column << ") did not find a cell. " << interface;
0
2272 return
never executed: return false;
false;
never executed: return false;
0
2273 }-
2274 int index = interface->indexOfChild(cell);-
2275 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2343, __PRETTY_FUNCTION__).debug() << "QSpiAdaptor::GetIndexAt row:" << row << " col:" << column << " logical index:" << index;
never executed: QMessageLogger(__FILE__, 2343, __PRETTY_FUNCTION__).debug() << "QSpiAdaptor::GetIndexAt row:" << row << " col:" << column << " logical index:" << index;
0
2276 ((!(index > 0)) ? qt_assert("index > 0",__FILE__,2344) : qt_noop());-
2277 connection.send(message.createReply(index));-
2278 }
never executed: end of block
else if ((
(function == Q...lumnAtIndex"))Description
TRUEnever evaluated
FALSEnever evaluated
function == QLatin1String("GetColumnAtIndex"))
(function == Q...lumnAtIndex"))Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(function == Q...tRowAtIndex"))Description
TRUEnever evaluated
FALSEnever evaluated
function == QLatin1String("GetRowAtIndex"))
(function == Q...tRowAtIndex"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2279 int index = message.arguments().at(0).toInt();-
2280 int ret = -1;-
2281 if (index >= 0
index >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2282 QAccessibleInterface * cell = interface->child(index);-
2283 if (cell
cellDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2284 if (function == QLatin1String("GetColumnAtIndex")
function == QL...olumnAtIndex")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2285 if (cell->role() == QAccessible::ColumnHeader
cell->role() =...::ColumnHeaderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2286 ret = index;-
2287 }
never executed: end of block
else if (cell->role() == QAccessible::RowHeader
cell->role() =...ble::RowHeaderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2288 ret = -1;-
2289 }
never executed: end of block
else {
0
2290 if (!cell->tableCellInterface()
!cell->tableCellInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2291 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2359, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;
never executed: QMessageLogger(__FILE__, 2359, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;
0
2292 return
never executed: return false;
false;
never executed: return false;
0
2293 }-
2294 ret = cell->tableCellInterface()->columnIndex();-
2295 }
never executed: end of block
0
2296 } else {-
2297 if (cell->role() == QAccessible::ColumnHeader
cell->role() =...::ColumnHeaderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2298 ret = -1;-
2299 }
never executed: end of block
else if (cell->role() == QAccessible::RowHeader
cell->role() =...ble::RowHeaderDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2300 ret = index % interface->tableInterface()->columnCount();-
2301 }
never executed: end of block
else {
0
2302 if (!cell->tableCellInterface()
!cell->tableCellInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2303 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2371, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;
never executed: QMessageLogger(__FILE__, 2371, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;
0
2304 return
never executed: return false;
false;
never executed: return false;
0
2305 }-
2306 ret = cell->tableCellInterface()->rowIndex();-
2307 }
never executed: end of block
0
2308 }-
2309 } else {-
2310 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2378, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No cell at index: " << index << interface;
never executed: QMessageLogger(__FILE__, 2378, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No cell at index: " << index << interface;
0
2311 return
never executed: return false;
false;
never executed: return false;
0
2312 }-
2313 }-
2314 connection.send(message.createReply(ret));-
2315-
2316 }
never executed: end of block
else if (function == QLatin1String("GetColumnDescription")
function == QL...nDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2317 int column = message.arguments().at(0).toInt();-
2318 connection.send(message.createReply(interface->tableInterface()->columnDescription(column)));-
2319 }
never executed: end of block
else if (function == QLatin1String("GetRowDescription")
function == QL...wDescription")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2320 int row = message.arguments().at(0).toInt();-
2321 connection.send(message.createReply(interface->tableInterface()->rowDescription(row)));-
2322-
2323-
2324-
2325 }
never executed: end of block
else if (function == QLatin1String("GetRowColumnExtentsAtIndex")
function == QL...tentsAtIndex")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2326 int index = message.arguments().at(0).toInt();-
2327 bool success = false;-
2328-
2329 int row = -1;-
2330 int col = -1;-
2331 int rowExtents = -1;-
2332 int colExtents = -1;-
2333 bool isSelected = false;-
2334-
2335 int cols = interface->tableInterface()->columnCount();-
2336 if (cols > 0
cols > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2337 row = index / cols;-
2338 col = index % cols;-
2339 QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, col)->tableCellInterface();-
2340 if (cell
cellDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2341 row = cell->rowIndex();-
2342 col = cell->columnIndex();-
2343 rowExtents = cell->rowExtent();-
2344 colExtents = cell->columnExtent();-
2345 isSelected = cell->isSelected();-
2346 success = true;-
2347 }
never executed: end of block
0
2348 }
never executed: end of block
0
2349 QVariantList list;-
2350 list << success << row << col << rowExtents << colExtents << isSelected;-
2351 connection.send(message.createReply(list));-
2352-
2353 }
never executed: end of block
else if (function == QLatin1String("GetColumnExtentAt")
function == QL...lumnExtentAt")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2354 int row = message.arguments().at(0).toInt();-
2355 int column = message.arguments().at(1).toInt();-
2356 connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->columnExtent()));-
2357-
2358 }
never executed: end of block
else if (function == QLatin1String("GetRowExtentAt")
function == QL...tRowExtentAt")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2359 int row = message.arguments().at(0).toInt();-
2360 int column = message.arguments().at(1).toInt();-
2361 connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->rowExtent()));-
2362-
2363 }
never executed: end of block
else if (function == QLatin1String("GetColumnHeader")
function == QL...ColumnHeader")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2364 int column = message.arguments().at(0).toInt();-
2365 QSpiObjectReference ref;-
2366-
2367 QAccessibleInterface * cell(interface->tableInterface()->cellAt(0, column));-
2368 if (cell
cellDescription
TRUEnever evaluated
FALSEnever evaluated
&& cell->tableCellInterface()
cell->tableCellInterface()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2369 QList<QAccessibleInterface*> header = cell->tableCellInterface()->columnHeaderCells();-
2370 if (header.size() > 0
header.size() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2371 ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(header.takeAt(0))));-
2372 }
never executed: end of block
0
2373 }
never executed: end of block
0
2374 connection.send(message.createReply(QVariant::fromValue(ref)));-
2375-
2376 }
never executed: end of block
else if (function == QLatin1String("GetRowHeader")
function == QL...GetRowHeader")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2377 int row = message.arguments().at(0).toInt();-
2378 QSpiObjectReference ref;-
2379 QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, 0)->tableCellInterface();-
2380 if (cell
cellDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2381 QList<QAccessibleInterface*> header = cell->rowHeaderCells();-
2382 if (header.size() > 0
header.size() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2383 ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(header.takeAt(0))));-
2384 }
never executed: end of block
0
2385 }
never executed: end of block
0
2386 connection.send(message.createReply(QVariant::fromValue(ref)));-
2387-
2388 }
never executed: end of block
else if (function == QLatin1String("GetSelectedColumns")
function == QL...ectedColumns")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2389 connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedColumns())));-
2390 }
never executed: end of block
else if (function == QLatin1String("GetSelectedRows")
function == QL...SelectedRows")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2391 connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedRows())));-
2392 }
never executed: end of block
else if (function == QLatin1String("IsColumnSelected")
function == QL...lumnSelected")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2393 int column = message.arguments().at(0).toInt();-
2394 connection.send(message.createReply(interface->tableInterface()->isColumnSelected(column)));-
2395 }
never executed: end of block
else if (function == QLatin1String("IsRowSelected")
function == QL...sRowSelected")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2396 int row = message.arguments().at(0).toInt();-
2397 connection.send(message.createReply(interface->tableInterface()->isRowSelected(row)));-
2398 }
never executed: end of block
else if (function == QLatin1String("IsSelected")
function == QL...("IsSelected")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2399 int row = message.arguments().at(0).toInt();-
2400 int column = message.arguments().at(1).toInt();-
2401 QAccessibleTableCellInterface* cell = interface->tableInterface()->cellAt(row, column)->tableCellInterface();-
2402 connection.send(message.createReply(cell->isSelected()));-
2403 }
never executed: end of block
else if (function == QLatin1String("AddColumnSelection")
function == QL...umnSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2404 int column = message.arguments().at(0).toInt();-
2405 connection.send(message.createReply(interface->tableInterface()->selectColumn(column)));-
2406 }
never executed: end of block
else if (function == QLatin1String("AddRowSelection")
function == QL...RowSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2407 int row = message.arguments().at(0).toInt();-
2408 connection.send(message.createReply(interface->tableInterface()->selectRow(row)));-
2409 }
never executed: end of block
else if (function == QLatin1String("RemoveColumnSelection")
function == QL...umnSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2410 int column = message.arguments().at(0).toInt();-
2411 connection.send(message.createReply(interface->tableInterface()->unselectColumn(column)));-
2412 }
never executed: end of block
else if (function == QLatin1String("RemoveRowSelection")
function == QL...RowSelection")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2413 int row = message.arguments().at(0).toInt();-
2414 connection.send(message.createReply(interface->tableInterface()->unselectRow(row)));-
2415 }
never executed: end of block
else {
0
2416 if (!::isDebugging
!::isDebuggingDescription
TRUEnever evaluated
FALSEnever evaluated
);
never executed: ;
else QMessageLogger(__FILE__, 2484, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::tableInterface does not implement " << function << message.path();
never executed: QMessageLogger(__FILE__, 2484, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::tableInterface does not implement " << function << message.path();
0
2417 return
never executed: return false;
false;
never executed: return false;
0
2418 }-
2419 return
never executed: return true;
true;
never executed: return true;
0
2420}-
2421-
2422-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9