| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||
| 8 | static bool isDebugging = false; | - | ||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||
| 11 | AtSpiAdaptor::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__ ":" "128"), this, qFlagLocation("1""windowActivated(QObject*,bool)" "\0" __FILE__ ":" "128")); | - | ||||||||||||||||||||||||
| 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__ ":" "133")); | - | ||||||||||||||||||||||||
| 80 |     success = success
 
  | 0 | ||||||||||||||||||||||||
| 81 |                                                       QLatin1String("org.a11y.atspi.Registry"), QLatin1String("EventListenerDeregistered"), this,
  | 0 | ||||||||||||||||||||||||
| 82 |                                                       qFlagLocation("1""eventListenerDeregistered(QString,QString)" "\0" __FILE__ ":" "136"))
  | 0 | ||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||
| 85 | - | |||||||||||||||||||||||||
| 86 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 87 | - | |||||||||||||||||||||||||
| 88 | AtSpiAdaptor::~AtSpiAdaptor() | - | ||||||||||||||||||||||||
| 89 | { | - | ||||||||||||||||||||||||
| 90 | } | - | ||||||||||||||||||||||||
| 91 | - | |||||||||||||||||||||||||
| 92 | - | |||||||||||||||||||||||||
| 93 | - | |||||||||||||||||||||||||
| 94 | - | |||||||||||||||||||||||||
| 95 | QString 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
  | 0 | ||||||||||||||||||||||||
| 532 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 586, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << path;;never executed:  QMessageLogger(__FILE__, 586, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << path; | 0 | ||||||||||||||||||||||||
| 533 |         return never executed:   QString();return 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"))
  | 0 | ||||||||||||||||||||||||
| 542 |         xml.append(componentIntrospection); never executed:  xml.append(componentIntrospection); | 0 | ||||||||||||||||||||||||
| 543 |     if (interfaces.contains(QLatin1String("org.a11y.atspi.Text"))
  | 0 | ||||||||||||||||||||||||
| 544 |         xml.append(textIntrospection); never executed:  xml.append(textIntrospection); | 0 | ||||||||||||||||||||||||
| 545 |     if (interfaces.contains(QLatin1String("org.a11y.atspi.EditableText"))
  | 0 | ||||||||||||||||||||||||
| 546 |         xml.append(editableTextIntrospection); never executed:  xml.append(editableTextIntrospection); | 0 | ||||||||||||||||||||||||
| 547 |     if (interfaces.contains(QLatin1String("org.a11y.atspi.Action"))
  | 0 | ||||||||||||||||||||||||
| 548 |         xml.append(actionIntrospection); never executed:  xml.append(actionIntrospection); | 0 | ||||||||||||||||||||||||
| 549 |     if (interfaces.contains(QLatin1String("org.a11y.atspi.Table"))
  | 0 | ||||||||||||||||||||||||
| 550 |         xml.append(tableIntrospection); never executed:  xml.append(tableIntrospection); | 0 | ||||||||||||||||||||||||
| 551 |     if (interfaces.contains(QLatin1String("org.a11y.atspi.Value"))
  | 0 | ||||||||||||||||||||||||
| 552 |         xml.append(valueIntrospection); never executed:  xml.append(valueIntrospection); | 0 | ||||||||||||||||||||||||
| 553 |     if (path == QLatin1String("/org/a11y/atspi/accessible/" "root")
  | 0 | ||||||||||||||||||||||||
| 554 |         xml.append(applicationIntrospection); never executed:  xml.append(applicationIntrospection); | 0 | ||||||||||||||||||||||||
| 555 | - | |||||||||||||||||||||||||
| 556 |     return never executed:   xml;return xml;never executed:  return xml; | 0 | ||||||||||||||||||||||||
| 557 | } | - | ||||||||||||||||||||||||
| 558 | - | |||||||||||||||||||||||||
| 559 | void AtSpiAdaptor::setBitFlag(const QString &flag) | - | ||||||||||||||||||||||||
| 560 | { | - | ||||||||||||||||||||||||
| 561 | ((!(flag.size())) ? qt_assert("flag.size()",__FILE__,615) : qt_noop()); | - | ||||||||||||||||||||||||
| 562 | - | |||||||||||||||||||||||||
| 563 | - | |||||||||||||||||||||||||
| 564 | switch (flag.at(0).toLower().toLatin1()) { | - | ||||||||||||||||||||||||
| 565 |     case never executed:   'o':case 'o':never executed:   {case 'o': | 0 | ||||||||||||||||||||||||
| 566 |         if (flag.size() <= 8
  | 0 | ||||||||||||||||||||||||
| 567 | sendObject = 1; | - | ||||||||||||||||||||||||
| 568 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 569 | QString right = flag.mid(7); | - | ||||||||||||||||||||||||
| 570 |             if (false) { dead code:  { } | - | ||||||||||||||||||||||||
| 571 |             } dead code:   else if (right.startsWith(QLatin1String("ActiveDescendantChanged")){ }
  | - | ||||||||||||||||||||||||
| 572 | sendObject_active_descendant_changed = 1; | - | ||||||||||||||||||||||||
| 573 |             } never executed:   else if (right.startsWith(QLatin1String("AttributesChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 574 | sendObject_attributes_changed = 1; | - | ||||||||||||||||||||||||
| 575 |             } never executed:   else if (right.startsWith(QLatin1String("BoundsChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 576 | sendObject_bounds_changed = 1; | - | ||||||||||||||||||||||||
| 577 |             } never executed:   else if (right.startsWith(QLatin1String("ChildrenChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 578 | sendObject_children_changed = 1; | - | ||||||||||||||||||||||||
| 579 |             } never executed:   else if (right.startsWith(QLatin1String("ColumnDeleted"))end of block
  | 0 | ||||||||||||||||||||||||
| 580 | sendObject_column_deleted = 1; | - | ||||||||||||||||||||||||
| 581 |             } never executed:   else if (right.startsWith(QLatin1String("ColumnInserted"))end of block
  | 0 | ||||||||||||||||||||||||
| 582 | sendObject_column_inserted = 1; | - | ||||||||||||||||||||||||
| 583 |             } never executed:   else if (right.startsWith(QLatin1String("ColumnReordered"))end of block
  | 0 | ||||||||||||||||||||||||
| 584 | sendObject_column_reordered = 1; | - | ||||||||||||||||||||||||
| 585 |             } never executed:   else if (right.startsWith(QLatin1String("LinkSelected"))end of block
  | 0 | ||||||||||||||||||||||||
| 586 | sendObject_link_selected = 1; | - | ||||||||||||||||||||||||
| 587 |             } never executed:   else if (right.startsWith(QLatin1String("ModelChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 588 | sendObject_model_changed = 1; | - | ||||||||||||||||||||||||
| 589 |             } never executed:   else if (right.startsWith(QLatin1String("PropertyChange"))end of block
  | 0 | ||||||||||||||||||||||||
| 590 |                 if (right == QLatin1String("PropertyChange:AccessibleDescription")
  | 0 | ||||||||||||||||||||||||
| 591 | sendObject_property_change_accessible_description = 1; | - | ||||||||||||||||||||||||
| 592 |                 } never executed:   else if (right == QLatin1String("PropertyChange:AccessibleName")end of block
  | 0 | ||||||||||||||||||||||||
| 593 | sendObject_property_change_accessible_name = 1; | - | ||||||||||||||||||||||||
| 594 |                 } never executed:   else if (right == QLatin1String("PropertyChange:AccessibleParent")end of block
  | 0 | ||||||||||||||||||||||||
| 595 | sendObject_property_change_accessible_parent = 1; | - | ||||||||||||||||||||||||
| 596 |                 } never executed:   else if (right == QLatin1String("PropertyChange:AccessibleRole")end of block
  | 0 | ||||||||||||||||||||||||
| 597 | sendObject_property_change_accessible_role = 1; | - | ||||||||||||||||||||||||
| 598 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableCaption")end of block
  | 0 | ||||||||||||||||||||||||
| 599 | sendObject_property_change_accessible_table_caption = 1; | - | ||||||||||||||||||||||||
| 600 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableColumnDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 601 | sendObject_property_change_accessible_table_column_description = 1; | - | ||||||||||||||||||||||||
| 602 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableColumnHeader")end of block
  | 0 | ||||||||||||||||||||||||
| 603 | sendObject_property_change_accessible_table_column_header = 1; | - | ||||||||||||||||||||||||
| 604 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableRowDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 605 | sendObject_property_change_accessible_table_row_description = 1; | - | ||||||||||||||||||||||||
| 606 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableRowHeader")end of block
  | 0 | ||||||||||||||||||||||||
| 607 | sendObject_property_change_accessible_table_row_header = 1; | - | ||||||||||||||||||||||||
| 608 |                 } never executed:   else if (right == QLatin1String("PropertyChange:TableSummary")end of block
  | 0 | ||||||||||||||||||||||||
| 609 | sendObject_property_change_accessible_table_summary = 1; | - | ||||||||||||||||||||||||
| 610 |                 } never executed:   else if (right == QLatin1String("PropertyChange:AccessibleValue")end of block
  | 0 | ||||||||||||||||||||||||
| 611 | sendObject_property_change_accessible_value = 1; | - | ||||||||||||||||||||||||
| 612 |                 } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 613 | sendObject_property_change = 1; | - | ||||||||||||||||||||||||
| 614 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 615 |             } else if (right.startsWith(QLatin1String("RowDeleted"))
  | 0 | ||||||||||||||||||||||||
| 616 | sendObject_row_deleted = 1; | - | ||||||||||||||||||||||||
| 617 |             } never executed:   else if (right.startsWith(QLatin1String("RowInserted"))end of block
  | 0 | ||||||||||||||||||||||||
| 618 | sendObject_row_inserted = 1; | - | ||||||||||||||||||||||||
| 619 |             } never executed:   else if (right.startsWith(QLatin1String("RowReordered"))end of block
  | 0 | ||||||||||||||||||||||||
| 620 | sendObject_row_reordered = 1; | - | ||||||||||||||||||||||||
| 621 |             } never executed:   else if (right.startsWith(QLatin1String("SelectionChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 622 | sendObject_selection_changed = 1; | - | ||||||||||||||||||||||||
| 623 |             } never executed:   else if (right.startsWith(QLatin1String("StateChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 624 | sendObject_state_changed = 1; | - | ||||||||||||||||||||||||
| 625 |             } never executed:   else if (right.startsWith(QLatin1String("TextAttributesChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 626 | sendObject_text_attributes_changed = 1; | - | ||||||||||||||||||||||||
| 627 |             } never executed:   else if (right.startsWith(QLatin1String("TextBoundsChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 628 | sendObject_text_bounds_changed = 1; | - | ||||||||||||||||||||||||
| 629 |             } never executed:   else if (right.startsWith(QLatin1String("TextCaretMoved"))end of block
  | 0 | ||||||||||||||||||||||||
| 630 | sendObject_text_caret_moved = 1; | - | ||||||||||||||||||||||||
| 631 |             } never executed:   else if (right.startsWith(QLatin1String("TextChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 632 | sendObject_text_changed = 1; | - | ||||||||||||||||||||||||
| 633 |             } never executed:   else if (right.startsWith(QLatin1String("TextSelectionChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 634 | sendObject_text_selection_changed = 1; | - | ||||||||||||||||||||||||
| 635 |             } never executed:   else if (right.startsWith(QLatin1String("ValueChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 636 | sendObject_value_changed = 1; | - | ||||||||||||||||||||||||
| 637 |             } never executed:   else if (right.startsWith(QLatin1String("VisibleDataChanged"))end of block
  | 0 | ||||||||||||||||||||||||
| 638 |                     || right.startsWith(QLatin1String("VisibledataChanged"))
  | 0 | ||||||||||||||||||||||||
| 639 | sendObject_visible_data_changed = 1; | - | ||||||||||||||||||||||||
| 640 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 641 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 695, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;;never executed:  QMessageLogger(__FILE__, 695, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag; | 0 | ||||||||||||||||||||||||
| 642 | } | - | ||||||||||||||||||||||||
| 643 | } | - | ||||||||||||||||||||||||
| 644 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 645 | } | - | ||||||||||||||||||||||||
| 646 |     case never executed:   'w':case 'w':never executed:   {case 'w': | 0 | ||||||||||||||||||||||||
| 647 |         if (flag.size() <= 8
  | 0 | ||||||||||||||||||||||||
| 648 | sendWindow = 1; | - | ||||||||||||||||||||||||
| 649 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 650 | QString right = flag.mid(7); | - | ||||||||||||||||||||||||
| 651 |             if (false) { dead code:  { } | - | ||||||||||||||||||||||||
| 652 |             } dead code:   else if (right.startsWith(QLatin1String("Activate")){ }
  | - | ||||||||||||||||||||||||
| 653 | sendWindow_activate = 1; | - | ||||||||||||||||||||||||
| 654 |             } never executed:   else if (right.startsWith(QLatin1String("Close"))end of block
  | 0 | ||||||||||||||||||||||||
| 655 | sendWindow_close= 1; | - | ||||||||||||||||||||||||
| 656 |             } never executed:   else if (right.startsWith(QLatin1String("Create"))end of block
  | 0 | ||||||||||||||||||||||||
| 657 | sendWindow_create = 1; | - | ||||||||||||||||||||||||
| 658 |             } never executed:   else if (right.startsWith(QLatin1String("Deactivate"))end of block
  | 0 | ||||||||||||||||||||||||
| 659 | sendWindow_deactivate = 1; | - | ||||||||||||||||||||||||
| 660 |             } never executed:   else if (right.startsWith(QLatin1String("Lower"))end of block
  | 0 | ||||||||||||||||||||||||
| 661 | sendWindow_lower = 1; | - | ||||||||||||||||||||||||
| 662 |             } never executed:   else if (right.startsWith(QLatin1String("Maximize"))end of block
  | 0 | ||||||||||||||||||||||||
| 663 | sendWindow_maximize = 1; | - | ||||||||||||||||||||||||
| 664 |             } never executed:   else if (right.startsWith(QLatin1String("Minimize"))end of block
  | 0 | ||||||||||||||||||||||||
| 665 | sendWindow_minimize = 1; | - | ||||||||||||||||||||||||
| 666 |             } never executed:   else if (right.startsWith(QLatin1String("Move"))end of block
  | 0 | ||||||||||||||||||||||||
| 667 | sendWindow_move = 1; | - | ||||||||||||||||||||||||
| 668 |             } never executed:   else if (right.startsWith(QLatin1String("Raise"))end of block
  | 0 | ||||||||||||||||||||||||
| 669 | sendWindow_raise = 1; | - | ||||||||||||||||||||||||
| 670 |             } never executed:   else if (right.startsWith(QLatin1String("Reparent"))end of block
  | 0 | ||||||||||||||||||||||||
| 671 | sendWindow_reparent = 1; | - | ||||||||||||||||||||||||
| 672 |             } never executed:   else if (right.startsWith(QLatin1String("Resize"))end of block
  | 0 | ||||||||||||||||||||||||
| 673 | sendWindow_resize = 1; | - | ||||||||||||||||||||||||
| 674 |             } never executed:   else if (right.startsWith(QLatin1String("Restore"))end of block
  | 0 | ||||||||||||||||||||||||
| 675 | sendWindow_restore = 1; | - | ||||||||||||||||||||||||
| 676 |             } never executed:   else if (right.startsWith(QLatin1String("Restyle"))end of block
  | 0 | ||||||||||||||||||||||||
| 677 | sendWindow_restyle = 1; | - | ||||||||||||||||||||||||
| 678 |             } never executed:   else if (right.startsWith(QLatin1String("Shade"))end of block
  | 0 | ||||||||||||||||||||||||
| 679 | sendWindow_shade = 1; | - | ||||||||||||||||||||||||
| 680 |             } never executed:   else if (right.startsWith(QLatin1String("Unshade"))end of block
  | 0 | ||||||||||||||||||||||||
| 681 | sendWindow_unshade = 1; | - | ||||||||||||||||||||||||
| 682 |             } never executed:   else if (right.startsWith(QLatin1String("DesktopCreate"))end of block
  | 0 | ||||||||||||||||||||||||
| 683 | - | |||||||||||||||||||||||||
| 684 |             } never executed:   else if (right.startsWith(QLatin1String("DesktopDestroy"))end of block
  | 0 | ||||||||||||||||||||||||
| 685 | - | |||||||||||||||||||||||||
| 686 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 687 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 741, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;;never executed:  QMessageLogger(__FILE__, 741, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag; | 0 | ||||||||||||||||||||||||
| 688 | } | - | ||||||||||||||||||||||||
| 689 | } | - | ||||||||||||||||||||||||
| 690 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 691 | } | - | ||||||||||||||||||||||||
| 692 |     case never executed:   'f':case 'f':never executed:   {case 'f': | 0 | ||||||||||||||||||||||||
| 693 | sendFocus = 1; | - | ||||||||||||||||||||||||
| 694 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 695 | } | - | ||||||||||||||||||||||||
| 696 |     case never executed:   'd':case 'd':never executed:   {case 'd': | 0 | ||||||||||||||||||||||||
| 697 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 698 | } | - | ||||||||||||||||||||||||
| 699 |     case never executed:   't':case 't':never executed:   {case 't': | 0 | ||||||||||||||||||||||||
| 700 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 701 | } | - | ||||||||||||||||||||||||
| 702 |     case never executed:   'm':case '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
 never executed:   else QMessageLogger(__FILE__, 760, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag;;never executed:  QMessageLogger(__FILE__, 760, __PRETTY_FUNCTION__).debug() << "WARNING: subscription string not handled:" << flag; | 0 | ||||||||||||||||||||||||
| 707 | } | - | ||||||||||||||||||||||||
| 708 | } | - | ||||||||||||||||||||||||
| 709 | - | |||||||||||||||||||||||||
| 710 | - | |||||||||||||||||||||||||
| 711 | - | |||||||||||||||||||||||||
| 712 | - | |||||||||||||||||||||||||
| 713 | void 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()
  | 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:   else {end of block | 0 | ||||||||||||||||||||||||
| 726 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 780, __PRETTY_FUNCTION__).debug() << "Could not query active accessibility event listeners.";;never executed:  QMessageLogger(__FILE__, 780, __PRETTY_FUNCTION__).debug() << "Could not query active accessibility event listeners."; | 0 | ||||||||||||||||||||||||
| 727 | } | - | ||||||||||||||||||||||||
| 728 | } | - | ||||||||||||||||||||||||
| 729 | - | |||||||||||||||||||||||||
| 730 | void AtSpiAdaptor::eventListenerDeregistered(const QString & , const QString & ) | - | ||||||||||||||||||||||||
| 731 | { | - | ||||||||||||||||||||||||
| 732 | - | |||||||||||||||||||||||||
| 733 | updateEventListeners(); | - | ||||||||||||||||||||||||
| 734 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 735 | - | |||||||||||||||||||||||||
| 736 | void AtSpiAdaptor::eventListenerRegistered(const QString & , const QString & ) | - | ||||||||||||||||||||||||
| 737 | { | - | ||||||||||||||||||||||||
| 738 | - | |||||||||||||||||||||||||
| 739 | updateEventListeners(); | - | ||||||||||||||||||||||||
| 740 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 741 | - | |||||||||||||||||||||||||
| 742 | - | |||||||||||||||||||||||||
| 743 | - | |||||||||||||||||||||||||
| 744 | - | |||||||||||||||||||||||||
| 745 | - | |||||||||||||||||||||||||
| 746 | void AtSpiAdaptor::windowActivated(QObject* window, bool active) | - | ||||||||||||||||||||||||
| 747 | { | - | ||||||||||||||||||||||||
| 748 |     if (!(sendWindow
 
  | 0 | ||||||||||||||||||||||||
| 749 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||
| 751 | QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window); | - | ||||||||||||||||||||||||
| 752 | ((!(iface)) ? qt_assert("iface",__FILE__,806) : qt_noop()); | - | ||||||||||||||||||||||||
| 753 | ((!(!active || iface->isValid())) ? qt_assert("!active || iface->isValid()",__FILE__,807) : qt_noop()); | - | ||||||||||||||||||||||||
| 754 | - | |||||||||||||||||||||||||
| 755 | QString windowTitle; | - | ||||||||||||||||||||||||
| 756 | - | |||||||||||||||||||||||||
| 757 |     if (iface->isValid()
  | 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
  | 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 | - | |||||||||||||||||||||||||
| 774 | QVariantList 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:   arguments;return arguments;never executed:  return arguments; | 0 | ||||||||||||||||||||||||
| 780 | } | - | ||||||||||||||||||||||||
| 781 | - | |||||||||||||||||||||||||
| 782 | QVariant 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:   QVariant::fromValue(data);return QVariant::fromValue(data);never executed:  return QVariant::fromValue(data); | 0 | ||||||||||||||||||||||||
| 787 | } | - | ||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||
| 789 | bool 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:   m_dbus->connection().send(message);return m_dbus->connection().send(message);never executed:  return m_dbus->connection().send(message); | 0 | ||||||||||||||||||||||||
| 794 | } | - | ||||||||||||||||||||||||
| 795 | - | |||||||||||||||||||||||||
| 796 | QAccessibleInterface *AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) const | - | ||||||||||||||||||||||||
| 797 | { | - | ||||||||||||||||||||||||
| 798 |     if (dbusPath == QLatin1String("/org/a11y/atspi/accessible/" "root")
  | 0 | ||||||||||||||||||||||||
| 799 |         return never executed:   QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));return 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
  | 0 | ||||||||||||||||||||||||
| 803 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 857, __PRETTY_FUNCTION__).debug() << "invalid path: " << dbusPath;;never executed:  QMessageLogger(__FILE__, 857, __PRETTY_FUNCTION__).debug() << "invalid path: " << dbusPath; | 0 | ||||||||||||||||||||||||
| 804 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 805 | } | - | ||||||||||||||||||||||||
| 806 | - | |||||||||||||||||||||||||
| 807 | QString objectString = parts.at(5); | - | ||||||||||||||||||||||||
| 808 | QAccessible::Id id = objectString.toUInt(); | - | ||||||||||||||||||||||||
| 809 | - | |||||||||||||||||||||||||
| 810 | - | |||||||||||||||||||||||||
| 811 |     if ((
 
  | 0 | ||||||||||||||||||||||||
| 812 |         QMessageLogger(__FILE__, 866, __PRETTY_FUNCTION__).warning() << "No accessible object found for id: " << id; never executed:  QMessageLogger(__FILE__, 866, __PRETTY_FUNCTION__).warning() << "No accessible object found for id: " << id; | 0 | ||||||||||||||||||||||||
| 813 | - | |||||||||||||||||||||||||
| 814 |     return never executed:   QAccessible::accessibleInterface(id);return QAccessible::accessibleInterface(id);never executed:  return QAccessible::accessibleInterface(id); | 0 | ||||||||||||||||||||||||
| 815 | } | - | ||||||||||||||||||||||||
| 816 | - | |||||||||||||||||||||||||
| 817 | void 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 | - | |||||||||||||||||||||||||
| 829 | void AtSpiAdaptor::notify(QAccessibleEvent *event) | - | ||||||||||||||||||||||||
| 830 | { | - | ||||||||||||||||||||||||
| 831 | switch (event->type()) { | - | ||||||||||||||||||||||||
| 832 |     case never executed:   QAccessible::ObjectCreated:case QAccessible::ObjectCreated:never executed:  case QAccessible::ObjectCreated: | 0 | ||||||||||||||||||||||||
| 833 |         if (sendObject
 
  | 0 | ||||||||||||||||||||||||
| 834 |             notifyAboutCreation(event->accessibleInterface()); never executed:  notifyAboutCreation(event->accessibleInterface()); | 0 | ||||||||||||||||||||||||
| 835 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 836 |     case never executed:   QAccessible::ObjectShow:case QAccessible::ObjectShow:never executed:   {case QAccessible::ObjectShow: | 0 | ||||||||||||||||||||||||
| 837 |         if (sendObject
 
  | 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:   QAccessible::ObjectHide:case QAccessible::ObjectHide:never executed:   {case QAccessible::ObjectHide: | 0 | ||||||||||||||||||||||||
| 843 |         if (sendObject
 
  | 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:   QAccessible::ObjectDestroyed:case QAccessible::ObjectDestroyed:never executed:   {case QAccessible::ObjectDestroyed: | 0 | ||||||||||||||||||||||||
| 849 |         if (sendObject
 
  | 0 | ||||||||||||||||||||||||
| 850 |             notifyAboutDestruction(event->accessibleInterface()); never executed:  notifyAboutDestruction(event->accessibleInterface()); | 0 | ||||||||||||||||||||||||
| 851 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 852 | } | - | ||||||||||||||||||||||||
| 853 |     case never executed:   QAccessible::ObjectReorder:case QAccessible::ObjectReorder:never executed:   {case QAccessible::ObjectReorder: | 0 | ||||||||||||||||||||||||
| 854 |         if (sendObject
 
  | 0 | ||||||||||||||||||||||||
| 855 |             childrenChanged(event->accessibleInterface()); never executed:  childrenChanged(event->accessibleInterface()); | 0 | ||||||||||||||||||||||||
| 856 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 857 | } | - | ||||||||||||||||||||||||
| 858 |     case never executed:   QAccessible::NameChanged:case QAccessible::NameChanged:never executed:   {case QAccessible::NameChanged: | 0 | ||||||||||||||||||||||||
| 859 |         if (sendObject
 
 
  | 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:   QAccessible::DescriptionChanged:case QAccessible::DescriptionChanged:never executed:   {case QAccessible::DescriptionChanged: | 0 | ||||||||||||||||||||||||
| 868 |         if (sendObject
 
 
  | 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:   QAccessible::Focus:case QAccessible::Focus:never executed:   {case QAccessible::Focus: | 0 | ||||||||||||||||||||||||
| 877 |         if (sendFocus
 
 
  | 0 | ||||||||||||||||||||||||
| 878 |             sendFocusChanged(event->accessibleInterface()); never executed:  sendFocusChanged(event->accessibleInterface()); | 0 | ||||||||||||||||||||||||
| 879 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 880 | } | - | ||||||||||||||||||||||||
| 881 |     case never executed:   QAccessible::TextInserted:case QAccessible::TextInserted:never executed:  case QAccessible::TextInserted: | 0 | ||||||||||||||||||||||||
| 882 |     case never executed:   QAccessible::TextRemoved:case QAccessible::TextRemoved:never executed:  case QAccessible::TextRemoved: | 0 | ||||||||||||||||||||||||
| 883 |     case never executed:   QAccessible::TextUpdated:case QAccessible::TextUpdated:never executed:   {case QAccessible::TextUpdated: | 0 | ||||||||||||||||||||||||
| 884 |         if (sendObject
 
  | 0 | ||||||||||||||||||||||||
| 885 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 886 |             if (!iface
 
  | 0 | ||||||||||||||||||||||||
| 887 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 941, __PRETTY_FUNCTION__).debug() << "Received text event for invalid interface.";;never executed:  QMessageLogger(__FILE__, 941, __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
  | 0 | ||||||||||||||||||||||||
| 898 | QAccessibleTextInsertEvent *textEvent = static_cast<QAccessibleTextInsertEvent*>(event); | - | ||||||||||||||||||||||||
| 899 | textInserted = textEvent->textInserted(); | - | ||||||||||||||||||||||||
| 900 | changePosition = textEvent->changePosition(); | - | ||||||||||||||||||||||||
| 901 | cursorPosition = textEvent->cursorPosition(); | - | ||||||||||||||||||||||||
| 902 |             } never executed:   else if (event->type() == QAccessible::TextRemovedend of block
  | 0 | ||||||||||||||||||||||||
| 903 | QAccessibleTextRemoveEvent *textEvent = static_cast<QAccessibleTextRemoveEvent*>(event); | - | ||||||||||||||||||||||||
| 904 | textRemoved = textEvent->textRemoved(); | - | ||||||||||||||||||||||||
| 905 | changePosition = textEvent->changePosition(); | - | ||||||||||||||||||||||||
| 906 | cursorPosition = textEvent->cursorPosition(); | - | ||||||||||||||||||||||||
| 907 |             } never executed:   else if (event->type() == QAccessible::TextInsertedend of block
  | 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()
  | 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()
  | 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:   QAccessible::TextCaretMoved:case QAccessible::TextCaretMoved:never executed:   {case QAccessible::TextCaretMoved: | 0 | ||||||||||||||||||||||||
| 942 |         if (sendObject
 
  | 0 | ||||||||||||||||||||||||
| 943 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 944 |             if (!iface
 
  | 0 | ||||||||||||||||||||||||
| 945 | QMessageLogger(__FILE__, 999, __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:   QAccessible::TextSelectionChanged:case QAccessible::TextSelectionChanged:never executed:   {case QAccessible::TextSelectionChanged: | 0 | ||||||||||||||||||||||||
| 960 |         if (sendObject
 
  | 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:   QAccessible::ValueChanged:case QAccessible::ValueChanged:never executed:   {case QAccessible::ValueChanged: | 0 | ||||||||||||||||||||||||
| 970 |         if (sendObject
 
 
  | 0 | ||||||||||||||||||||||||
| 971 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 972 |             if (!iface
  | 0 | ||||||||||||||||||||||||
| 973 | QMessageLogger(__FILE__, 1027, __PRETTY_FUNCTION__).warning() << "ValueChanged event from invalid accessible."; | - | ||||||||||||||||||||||||
| 974 |                 return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 975 | } | - | ||||||||||||||||||||||||
| 976 |             if (iface->valueInterface()
  | 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:   else if (iface->role() == QAccessible::ComboBoxend of block
  | 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:   else {end of block | 0 | ||||||||||||||||||||||||
| 992 | QMessageLogger(__FILE__, 1046, __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:   QAccessible::SelectionAdd:case QAccessible::SelectionAdd:never executed:  case QAccessible::SelectionAdd: | 0 | ||||||||||||||||||||||||
| 998 |     case never executed:   QAccessible::SelectionRemove:case QAccessible::SelectionRemove:never executed:  case QAccessible::SelectionRemove: | 0 | ||||||||||||||||||||||||
| 999 |     case never executed:   QAccessible::Selection:case QAccessible::Selection:never executed:   {case QAccessible::Selection: | 0 | ||||||||||||||||||||||||
| 1000 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 1001 |         if (!iface
  | 0 | ||||||||||||||||||||||||
| 1002 | QMessageLogger(__FILE__, 1056, __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
  | 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:   QAccessible::StateChanged:case QAccessible::StateChanged:never executed:   {case QAccessible::StateChanged: | 0 | ||||||||||||||||||||||||
| 1014 |         if (sendObject
 
 
 
  | 0 | ||||||||||||||||||||||||
| 1015 | QAccessible::State stateChange = static_cast<QAccessibleStateChangeEvent*>(event)->changedStates(); | - | ||||||||||||||||||||||||
| 1016 |             if (stateChange.checked
  | 0 | ||||||||||||||||||||||||
| 1017 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 1018 |                 if (!iface
  | 0 | ||||||||||||||||||||||||
| 1019 | QMessageLogger(__FILE__, 1073, __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:   else if (stateChange.activeend of block
  | 0 | ||||||||||||||||||||||||
| 1025 | QAccessibleInterface * iface = event->accessibleInterface(); | - | ||||||||||||||||||||||||
| 1026 |                 if (!iface
 
 
 
  | 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
  | 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:   else if (stateChange.disabledend of block
  | 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:   QAccessible::TableModelChanged:case QAccessible::TableModelChanged:never executed:  case QAccessible::TableModelChanged: | 0 | ||||||||||||||||||||||||
| 1050 | - | |||||||||||||||||||||||||
| 1051 | - | |||||||||||||||||||||||||
| 1052 | - | |||||||||||||||||||||||||
| 1053 |     case never executed:   QAccessible::ParentChanged:case QAccessible::ParentChanged:never executed:  case QAccessible::ParentChanged: | 0 | ||||||||||||||||||||||||
| 1054 |     case never executed:   QAccessible::DialogStart:case QAccessible::DialogStart:never executed:  case QAccessible::DialogStart: | 0 | ||||||||||||||||||||||||
| 1055 |     case never executed:   QAccessible::DialogEnd:case QAccessible::DialogEnd:never executed:  case QAccessible::DialogEnd: | 0 | ||||||||||||||||||||||||
| 1056 |     case never executed:   QAccessible::PopupMenuStart:case QAccessible::PopupMenuStart:never executed:  case QAccessible::PopupMenuStart: | 0 | ||||||||||||||||||||||||
| 1057 |     case never executed:   QAccessible::PopupMenuEnd:case QAccessible::PopupMenuEnd:never executed:  case QAccessible::PopupMenuEnd: | 0 | ||||||||||||||||||||||||
| 1058 |     case never executed:   QAccessible::SoundPlayed:case QAccessible::SoundPlayed:never executed:  case QAccessible::SoundPlayed: | 0 | ||||||||||||||||||||||||
| 1059 |     case never executed:   QAccessible::Alert:case QAccessible::Alert:never executed:  case QAccessible::Alert: | 0 | ||||||||||||||||||||||||
| 1060 |     case never executed:   QAccessible::ForegroundChanged:case QAccessible::ForegroundChanged:never executed:  case QAccessible::ForegroundChanged: | 0 | ||||||||||||||||||||||||
| 1061 |     case never executed:   QAccessible::MenuStart:case QAccessible::MenuStart:never executed:  case QAccessible::MenuStart: | 0 | ||||||||||||||||||||||||
| 1062 |     case never executed:   QAccessible::MenuEnd:case QAccessible::MenuEnd:never executed:  case QAccessible::MenuEnd: | 0 | ||||||||||||||||||||||||
| 1063 |     case never executed:   QAccessible::ContextHelpStart:case QAccessible::ContextHelpStart:never executed:  case QAccessible::ContextHelpStart: | 0 | ||||||||||||||||||||||||
| 1064 |     case never executed:   QAccessible::ContextHelpEnd:case QAccessible::ContextHelpEnd:never executed:  case QAccessible::ContextHelpEnd: | 0 | ||||||||||||||||||||||||
| 1065 |     case never executed:   QAccessible::DragDropStart:case QAccessible::DragDropStart:never executed:  case QAccessible::DragDropStart: | 0 | ||||||||||||||||||||||||
| 1066 |     case never executed:   QAccessible::DragDropEnd:case QAccessible::DragDropEnd:never executed:  case QAccessible::DragDropEnd: | 0 | ||||||||||||||||||||||||
| 1067 |     case never executed:   QAccessible::ScrollingStart:case QAccessible::ScrollingStart:never executed:  case QAccessible::ScrollingStart: | 0 | ||||||||||||||||||||||||
| 1068 |     case never executed:   QAccessible::ScrollingEnd:case QAccessible::ScrollingEnd:never executed:  case QAccessible::ScrollingEnd: | 0 | ||||||||||||||||||||||||
| 1069 |     case never executed:   QAccessible::MenuCommand:case QAccessible::MenuCommand:never executed:  case QAccessible::MenuCommand: | 0 | ||||||||||||||||||||||||
| 1070 |     case never executed:   QAccessible::ActionChanged:case QAccessible::ActionChanged:never executed:  case QAccessible::ActionChanged: | 0 | ||||||||||||||||||||||||
| 1071 |     case never executed:   QAccessible::ActiveDescendantChanged:case QAccessible::ActiveDescendantChanged:never executed:  case QAccessible::ActiveDescendantChanged: | 0 | ||||||||||||||||||||||||
| 1072 |     case never executed:   QAccessible::AttributeChanged:case QAccessible::AttributeChanged:never executed:  case QAccessible::AttributeChanged: | 0 | ||||||||||||||||||||||||
| 1073 |     case never executed:   QAccessible::DocumentContentChanged:case QAccessible::DocumentContentChanged:never executed:  case QAccessible::DocumentContentChanged: | 0 | ||||||||||||||||||||||||
| 1074 |     case never executed:   QAccessible::DocumentLoadComplete:case QAccessible::DocumentLoadComplete:never executed:  case QAccessible::DocumentLoadComplete: | 0 | ||||||||||||||||||||||||
| 1075 |     case never executed:   QAccessible::DocumentLoadStopped:case QAccessible::DocumentLoadStopped:never executed:  case QAccessible::DocumentLoadStopped: | 0 | ||||||||||||||||||||||||
| 1076 |     case never executed:   QAccessible::DocumentReload:case QAccessible::DocumentReload:never executed:  case QAccessible::DocumentReload: | 0 | ||||||||||||||||||||||||
| 1077 |     case never executed:   QAccessible::HyperlinkEndIndexChanged:case QAccessible::HyperlinkEndIndexChanged:never executed:  case QAccessible::HyperlinkEndIndexChanged: | 0 | ||||||||||||||||||||||||
| 1078 |     case never executed:   QAccessible::HyperlinkNumberOfAnchorsChanged:case QAccessible::HyperlinkNumberOfAnchorsChanged:never executed:  case QAccessible::HyperlinkNumberOfAnchorsChanged: | 0 | ||||||||||||||||||||||||
| 1079 |     case never executed:   QAccessible::HyperlinkSelectedLinkChanged:case QAccessible::HyperlinkSelectedLinkChanged:never executed:  case QAccessible::HyperlinkSelectedLinkChanged: | 0 | ||||||||||||||||||||||||
| 1080 |     case never executed:   QAccessible::HypertextLinkActivated:case QAccessible::HypertextLinkActivated:never executed:  case QAccessible::HypertextLinkActivated: | 0 | ||||||||||||||||||||||||
| 1081 |     case never executed:   QAccessible::HypertextLinkSelected:case QAccessible::HypertextLinkSelected:never executed:  case QAccessible::HypertextLinkSelected: | 0 | ||||||||||||||||||||||||
| 1082 |     case never executed:   QAccessible::HyperlinkStartIndexChanged:case QAccessible::HyperlinkStartIndexChanged:never executed:  case QAccessible::HyperlinkStartIndexChanged: | 0 | ||||||||||||||||||||||||
| 1083 |     case never executed:   QAccessible::HypertextChanged:case QAccessible::HypertextChanged:never executed:  case QAccessible::HypertextChanged: | 0 | ||||||||||||||||||||||||
| 1084 |     case never executed:   QAccessible::HypertextNLinksChanged:case QAccessible::HypertextNLinksChanged:never executed:  case QAccessible::HypertextNLinksChanged: | 0 | ||||||||||||||||||||||||
| 1085 |     case never executed:   QAccessible::ObjectAttributeChanged:case QAccessible::ObjectAttributeChanged:never executed:  case QAccessible::ObjectAttributeChanged: | 0 | ||||||||||||||||||||||||
| 1086 |     case never executed:   QAccessible::PageChanged:case QAccessible::PageChanged:never executed:  case QAccessible::PageChanged: | 0 | ||||||||||||||||||||||||
| 1087 |     case never executed:   QAccessible::SectionChanged:case QAccessible::SectionChanged:never executed:  case QAccessible::SectionChanged: | 0 | ||||||||||||||||||||||||
| 1088 |     case never executed:   QAccessible::TableCaptionChanged:case QAccessible::TableCaptionChanged:never executed:  case QAccessible::TableCaptionChanged: | 0 | ||||||||||||||||||||||||
| 1089 |     case never executed:   QAccessible::TableColumnDescriptionChanged:case QAccessible::TableColumnDescriptionChanged:never executed:  case QAccessible::TableColumnDescriptionChanged: | 0 | ||||||||||||||||||||||||
| 1090 |     case never executed:   QAccessible::TableColumnHeaderChanged:case QAccessible::TableColumnHeaderChanged:never executed:  case QAccessible::TableColumnHeaderChanged: | 0 | ||||||||||||||||||||||||
| 1091 |     case never executed:   QAccessible::TableRowDescriptionChanged:case QAccessible::TableRowDescriptionChanged:never executed:  case QAccessible::TableRowDescriptionChanged: | 0 | ||||||||||||||||||||||||
| 1092 |     case never executed:   QAccessible::TableRowHeaderChanged:case QAccessible::TableRowHeaderChanged:never executed:  case QAccessible::TableRowHeaderChanged: | 0 | ||||||||||||||||||||||||
| 1093 |     case never executed:   QAccessible::TableSummaryChanged:case QAccessible::TableSummaryChanged:never executed:  case QAccessible::TableSummaryChanged: | 0 | ||||||||||||||||||||||||
| 1094 |     case never executed:   QAccessible::TextAttributeChanged:case QAccessible::TextAttributeChanged:never executed:  case QAccessible::TextAttributeChanged: | 0 | ||||||||||||||||||||||||
| 1095 |     case never executed:   QAccessible::TextColumnChanged:case QAccessible::TextColumnChanged:never executed:  case QAccessible::TextColumnChanged: | 0 | ||||||||||||||||||||||||
| 1096 |     case never executed:   QAccessible::VisibleDataChanged:case QAccessible::VisibleDataChanged:never executed:  case QAccessible::VisibleDataChanged: | 0 | ||||||||||||||||||||||||
| 1097 |     case never executed:   QAccessible::SelectionWithin:case QAccessible::SelectionWithin:never executed:  case QAccessible::SelectionWithin: | 0 | ||||||||||||||||||||||||
| 1098 |     case never executed:   QAccessible::LocationChanged:case QAccessible::LocationChanged:never executed:  case QAccessible::LocationChanged: | 0 | ||||||||||||||||||||||||
| 1099 |     case never executed:   QAccessible::HelpChanged:case QAccessible::HelpChanged:never executed:  case QAccessible::HelpChanged: | 0 | ||||||||||||||||||||||||
| 1100 |     case never executed:   QAccessible::DefaultActionChanged:case QAccessible::DefaultActionChanged:never executed:  case QAccessible::DefaultActionChanged: | 0 | ||||||||||||||||||||||||
| 1101 |     case never executed:   QAccessible::AcceleratorChanged:case QAccessible::AcceleratorChanged:never executed:  case QAccessible::AcceleratorChanged: | 0 | ||||||||||||||||||||||||
| 1102 |     case never executed:   QAccessible::InvalidEvent:case QAccessible::InvalidEvent:never executed:  case QAccessible::InvalidEvent: | 0 | ||||||||||||||||||||||||
| 1103 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 1104 | } | - | ||||||||||||||||||||||||
| 1105 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1106 | - | |||||||||||||||||||||||||
| 1107 | void AtSpiAdaptor::sendFocusChanged(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1108 | { | - | ||||||||||||||||||||||||
| 1109 | static QString lastFocusPath; | - | ||||||||||||||||||||||||
| 1110 | - | |||||||||||||||||||||||||
| 1111 |     if (!lastFocusPath.isEmpty()
  | 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 | - | |||||||||||||||||||||||||
| 1131 | void AtSpiAdaptor::childrenChanged(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1132 | { | - | ||||||||||||||||||||||||
| 1133 | QString parentPath = pathForInterface(interface); | - | ||||||||||||||||||||||||
| 1134 | int childCount = interface->childCount(); | - | ||||||||||||||||||||||||
| 1135 |     for (int i = 0; i < interface->childCount()
  | 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 | - | |||||||||||||||||||||||||
| 1142 | void AtSpiAdaptor::notifyAboutCreation(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1143 | { | - | ||||||||||||||||||||||||
| 1144 | - | |||||||||||||||||||||||||
| 1145 | - | |||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||
| 1147 | - | |||||||||||||||||||||||||
| 1148 | QAccessibleInterface * parent = interface->parent(); | - | ||||||||||||||||||||||||
| 1149 |     if (!parent
  | 0 | ||||||||||||||||||||||||
| 1150 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1204, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutCreation: Could not find parent for " << interface->object();;never executed:  QMessageLogger(__FILE__, 1204, __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 | - | |||||||||||||||||||||||||
| 1160 | void AtSpiAdaptor::notifyAboutDestruction(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1161 | { | - | ||||||||||||||||||||||||
| 1162 |     if (!interface
 
  | 0 | ||||||||||||||||||||||||
| 1163 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 1164 | - | |||||||||||||||||||||||||
| 1165 | QAccessibleInterface * parent = interface->parent(); | - | ||||||||||||||||||||||||
| 1166 |     if (!parent
  | 0 | ||||||||||||||||||||||||
| 1167 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1221, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::notifyAboutDestruction: Could not find parent for " << interface->object();;never executed:  QMessageLogger(__FILE__, 1221, __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 | - | |||||||||||||||||||||||||
| 1190 | bool AtSpiAdaptor::handleMessage(const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1191 | { | - | ||||||||||||||||||||||||
| 1192 | - | |||||||||||||||||||||||||
| 1193 | QAccessibleInterface * accessible = interfaceFromPath(message.path()); | - | ||||||||||||||||||||||||
| 1194 |     if (!accessible
  | 0 | ||||||||||||||||||||||||
| 1195 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1249, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << message.path();;never executed:  QMessageLogger(__FILE__, 1249, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find accessible on path: " << message.path(); | 0 | ||||||||||||||||||||||||
| 1196 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1197 | } | - | ||||||||||||||||||||||||
| 1198 |     if (!accessible->isValid()
  | 0 | ||||||||||||||||||||||||
| 1199 | QMessageLogger(__FILE__, 1253, __PRETTY_FUNCTION__).warning() << "WARNING Qt AtSpiAdaptor: Accessible invalid: " << accessible << message.path(); | - | ||||||||||||||||||||||||
| 1200 |         return never executed:   false;return 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")
  | 0 | ||||||||||||||||||||||||
| 1209 | - | |||||||||||||||||||||||||
| 1210 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1211 | } | - | ||||||||||||||||||||||||
| 1212 | - | |||||||||||||||||||||||||
| 1213 | - | |||||||||||||||||||||||||
| 1214 |     if (interface
 
  | 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
 
  | 0 | ||||||||||||||||||||||||
| 1222 |         return never executed:   accessibleInterface(accessible, function, message, connection);return accessibleInterface(accessible, function, message, connection);never executed:  return accessibleInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1223 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1224 |         return never executed:   applicationInterface(accessible, function, message, connection);return applicationInterface(accessible, function, message, connection);never executed:  return applicationInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1225 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1226 |         return never executed:   componentInterface(accessible, function, message, connection);return componentInterface(accessible, function, message, connection);never executed:  return componentInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1227 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1228 |         return never executed:   actionInterface(accessible, function, message, connection);return actionInterface(accessible, function, message, connection);never executed:  return actionInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1229 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1230 |         return never executed:   textInterface(accessible, function, message, connection);return textInterface(accessible, function, message, connection);never executed:  return textInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1231 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1232 |         return never executed:   editableTextInterface(accessible, function, message, connection);return editableTextInterface(accessible, function, message, connection);never executed:  return editableTextInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1233 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1234 |         return never executed:   valueInterface(accessible, function, message, connection);return valueInterface(accessible, function, message, connection);never executed:  return valueInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1235 |     if (interface
 
  | 0 | ||||||||||||||||||||||||
| 1236 |         return never executed:   tableInterface(accessible, function, message, connection);return tableInterface(accessible, function, message, connection);never executed:  return tableInterface(accessible, function, message, connection); | 0 | ||||||||||||||||||||||||
| 1237 | - | |||||||||||||||||||||||||
| 1238 |     if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1292, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::handleMessage with unknown interface: " << message.path() << interface << function;;never executed:  QMessageLogger(__FILE__, 1292, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::handleMessage with unknown interface: " << message.path() << interface << function; | 0 | ||||||||||||||||||||||||
| 1239 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1240 | } | - | ||||||||||||||||||||||||
| 1241 | - | |||||||||||||||||||||||||
| 1242 | - | |||||||||||||||||||||||||
| 1243 | bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1244 | { | - | ||||||||||||||||||||||||
| 1245 |     if (message.path() != QLatin1String("/org/a11y/atspi/accessible/root")
  | 0 | ||||||||||||||||||||||||
| 1246 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1300, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find application interface for: " << message.path() << interface;;never executed:  QMessageLogger(__FILE__, 1300, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find application interface for: " << message.path() << interface; | 0 | ||||||||||||||||||||||||
| 1247 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1248 | } | - | ||||||||||||||||||||||||
| 1249 | - | |||||||||||||||||||||||||
| 1250 |     if (function == QLatin1String("SetId")
  | 0 | ||||||||||||||||||||||||
| 1251 | ((!(message.signature() == QLatin1String("ssv"))) ? qt_assert("message.signature() == QLatin1String(\"ssv\")",__FILE__,1305) : qt_noop()); | - | ||||||||||||||||||||||||
| 1252 | QVariant value = qvariant_cast<QDBusVariant>(message.arguments().at(2)).variant(); | - | ||||||||||||||||||||||||
| 1253 | - | |||||||||||||||||||||||||
| 1254 | m_applicationId = value.toInt(); | - | ||||||||||||||||||||||||
| 1255 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1256 | } | - | ||||||||||||||||||||||||
| 1257 |     if (function == QLatin1String("GetId")
  | 0 | ||||||||||||||||||||||||
| 1258 | ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1312) : qt_noop()); | - | ||||||||||||||||||||||||
| 1259 | QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(m_applicationId))); | - | ||||||||||||||||||||||||
| 1260 |         return never executed:   connection.send(reply);return connection.send(reply);never executed:  return connection.send(reply); | 0 | ||||||||||||||||||||||||
| 1261 | } | - | ||||||||||||||||||||||||
| 1262 |     if (function == QLatin1String("GetToolkitName")
  | 0 | ||||||||||||||||||||||||
| 1263 | ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1317) : qt_noop()); | - | ||||||||||||||||||||||||
| 1264 | QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String("Qt")))); | - | ||||||||||||||||||||||||
| 1265 |         return never executed:   connection.send(reply);return connection.send(reply);never executed:  return connection.send(reply); | 0 | ||||||||||||||||||||||||
| 1266 | } | - | ||||||||||||||||||||||||
| 1267 |     if (function == QLatin1String("GetVersion")
  | 0 | ||||||||||||||||||||||||
| 1268 | ((!(message.signature() == QLatin1String("ss"))) ? qt_assert("message.signature() == QLatin1String(\"ss\")",__FILE__,1322) : qt_noop()); | - | ||||||||||||||||||||||||
| 1269 | QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String(qVersion())))); | - | ||||||||||||||||||||||||
| 1270 |         return never executed:   connection.send(reply);return connection.send(reply);never executed:  return connection.send(reply); | 0 | ||||||||||||||||||||||||
| 1271 | } | - | ||||||||||||||||||||||||
| 1272 |     if (function == QLatin1String("GetLocale")
  | 0 | ||||||||||||||||||||||||
| 1273 | ((!(message.signature() == QLatin1String("u"))) ? qt_assert("message.signature() == QLatin1String(\"u\")",__FILE__,1327) : qt_noop()); | - | ||||||||||||||||||||||||
| 1274 | QDBusMessage reply = message.createReply(QVariant::fromValue(QLocale().name())); | - | ||||||||||||||||||||||||
| 1275 |         return never executed:   connection.send(reply);return connection.send(reply);never executed:  return connection.send(reply); | 0 | ||||||||||||||||||||||||
| 1276 | } | - | ||||||||||||||||||||||||
| 1277 |     if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1331, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::applicationInterface " << message.path() << interface << function;;never executed:  QMessageLogger(__FILE__, 1331, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::applicationInterface " << message.path() << interface << function; | 0 | ||||||||||||||||||||||||
| 1278 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1279 | } | - | ||||||||||||||||||||||||
| 1280 | - | |||||||||||||||||||||||||
| 1281 | - | |||||||||||||||||||||||||
| 1282 | - | |||||||||||||||||||||||||
| 1283 | - | |||||||||||||||||||||||||
| 1284 | void 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 ()
  | 0 | ||||||||||||||||||||||||
| 1295 | const QSpiObjectReference &socket = reply.value(); | - | ||||||||||||||||||||||||
| 1296 | accessibilityRegistry = QSpiObjectReference(socket); | - | ||||||||||||||||||||||||
| 1297 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1298 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1352, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: ";never executed:  QMessageLogger(__FILE__, 1352, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: " << reply.error().name() << reply.error().message(); | 0 | ||||||||||||||||||||||||
| 1299 |                    << reply.error().name() never executed:  QMessageLogger(__FILE__, 1352, __PRETTY_FUNCTION__).debug() << "Error in contacting registry: " << reply.error().name() << reply.error().message(); | 0 | ||||||||||||||||||||||||
| 1300 |                    << reply.error().message(); never executed:  QMessageLogger(__FILE__, 1352, __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 | - | |||||||||||||||||||||||||
| 1306 | bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1307 | { | - | ||||||||||||||||||||||||
| 1308 |     if (function == QLatin1String("GetRole")
  | 0 | ||||||||||||||||||||||||
| 1309 | sendReply(connection, message, (uint) getRole(interface)); | - | ||||||||||||||||||||||||
| 1310 |     } never executed:   else if (function == QLatin1String("GetName")end of block
  | 0 | ||||||||||||||||||||||||
| 1311 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Name)))); | - | ||||||||||||||||||||||||
| 1312 |     } never executed:   else if (function == QLatin1String("GetRoleName")end of block
  | 0 | ||||||||||||||||||||||||
| 1313 | sendReply(connection, message, qSpiRoleMapping[interface->role()].name()); | - | ||||||||||||||||||||||||
| 1314 |     } never executed:   else if (function == QLatin1String("GetLocalizedRoleName")end of block
  | 0 | ||||||||||||||||||||||||
| 1315 | sendReply(connection, message, QVariant::fromValue(qSpiRoleMapping[interface->role()].localizedName())); | - | ||||||||||||||||||||||||
| 1316 |     } never executed:   else if (function == QLatin1String("GetChildCount")end of block
  | 0 | ||||||||||||||||||||||||
| 1317 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->childCount()))); | - | ||||||||||||||||||||||||
| 1318 |     } never executed:   else if (function == QLatin1String("GetIndexInParent")end of block
  | 0 | ||||||||||||||||||||||||
| 1319 | int childIndex = -1; | - | ||||||||||||||||||||||||
| 1320 | QAccessibleInterface * parent = interface->parent(); | - | ||||||||||||||||||||||||
| 1321 |         if (parent
  | 0 | ||||||||||||||||||||||||
| 1322 | childIndex = parent->indexOfChild(interface); | - | ||||||||||||||||||||||||
| 1323 |             if (childIndex < 0
  | 0 | ||||||||||||||||||||||||
| 1324 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1378, __PRETTY_FUNCTION__).debug() << "GetIndexInParent get invalid index: " << childIndex << interface;;never executed:  QMessageLogger(__FILE__, 1378, __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:   else if (function == QLatin1String("GetParent")end of block
  | 0 | ||||||||||||||||||||||||
| 1329 | QString path; | - | ||||||||||||||||||||||||
| 1330 | QAccessibleInterface * parent = interface->parent(); | - | ||||||||||||||||||||||||
| 1331 |         if (!parent
  | 0 | ||||||||||||||||||||||||
| 1332 | path = QLatin1String("/org/a11y/atspi/null"); | - | ||||||||||||||||||||||||
| 1333 |         } never executed:   else if (parent->role() == QAccessible::Applicationend of block
  | 0 | ||||||||||||||||||||||||
| 1334 | path = QLatin1String("/org/a11y/atspi/accessible/root"); | - | ||||||||||||||||||||||||
| 1335 |         } never executed:   else {end of block | 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:   else if (function == QLatin1String("GetChildAtIndex")end of block
  | 0 | ||||||||||||||||||||||||
| 1342 | int index = message.arguments().first().toInt(); | - | ||||||||||||||||||||||||
| 1343 |         if (index < 0
  | 0 | ||||||||||||||||||||||||
| 1344 | sendReply(connection, message, QVariant::fromValue( | - | ||||||||||||||||||||||||
| 1345 | QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/null")))); | - | ||||||||||||||||||||||||
| 1346 |         } never executed:   else {end of block | 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")
  | 0 | ||||||||||||||||||||||||
| 1352 | sendReply(connection, message, accessibleInterfaces(interface)); | - | ||||||||||||||||||||||||
| 1353 |     } never executed:   else if (function == QLatin1String("GetDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 1354 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Description)))); | - | ||||||||||||||||||||||||
| 1355 |     } never executed:   else if (function == QLatin1String("GetState")end of block
  | 0 | ||||||||||||||||||||||||
| 1356 | quint64 spiState = spiStatesFromQState(interface->state()); | - | ||||||||||||||||||||||||
| 1357 |         if (interface->
 
  | 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
  | 0 | ||||||||||||||||||||||||
| 1362 |             role == QAccessible::ListItem
  | 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:   else if (function == QLatin1String("GetAttributes")end of block
  | 0 | ||||||||||||||||||||||||
| 1372 | sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet())); | - | ||||||||||||||||||||||||
| 1373 |     } never executed:   else if (function == QLatin1String("GetRelationSet")end of block
  | 0 | ||||||||||||||||||||||||
| 1374 | sendReply(connection, message, QVariant::fromValue(relationSet(interface, connection))); | - | ||||||||||||||||||||||||
| 1375 |     } never executed:   else if (function == QLatin1String("GetApplication")end of block
  | 0 | ||||||||||||||||||||||||
| 1376 | sendReply(connection, message, QVariant::fromValue( | - | ||||||||||||||||||||||||
| 1377 | QSpiObjectReference(connection, QDBusObjectPath("/org/a11y/atspi/accessible/" "root")))); | - | ||||||||||||||||||||||||
| 1378 |     } never executed:   else if (function == QLatin1String("GetChildren")end of block
  | 0 | ||||||||||||||||||||||||
| 1379 | QSpiObjectReferenceArray children; | - | ||||||||||||||||||||||||
| 1380 | const int numChildren = interface->childCount(); | - | ||||||||||||||||||||||||
| 1381 | children.reserve(numChildren); | - | ||||||||||||||||||||||||
| 1382 |         for (int i = 0; i < numChildren
  | 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:   else {end of block | 0 | ||||||||||||||||||||||||
| 1389 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1443, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::accessibleInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 1443, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::accessibleInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 1390 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1391 | } | - | ||||||||||||||||||||||||
| 1392 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1393 | } | - | ||||||||||||||||||||||||
| 1394 | - | |||||||||||||||||||||||||
| 1395 | AtspiRole AtSpiAdaptor::getRole(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1396 | { | - | ||||||||||||||||||||||||
| 1397 |     if ((interface->
 
 
 
  | 0 | ||||||||||||||||||||||||
| 1398 |         return never executed:   ATSPI_ROLE_PASSWORD_TEXT;return ATSPI_ROLE_PASSWORD_TEXT;never executed:  return ATSPI_ROLE_PASSWORD_TEXT; | 0 | ||||||||||||||||||||||||
| 1399 |     return never executed:   qSpiRoleMapping[interface->role()].spiRole();return qSpiRoleMapping[interface->role()].spiRole();never executed:  return qSpiRoleMapping[interface->role()].spiRole(); | 0 | ||||||||||||||||||||||||
| 1400 | } | - | ||||||||||||||||||||||||
| 1401 | - | |||||||||||||||||||||||||
| 1402 | - | |||||||||||||||||||||||||
| 1403 | - | |||||||||||||||||||||||||
| 1404 | QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1405 | { | - | ||||||||||||||||||||||||
| 1406 | QStringList ifaces; | - | ||||||||||||||||||||||||
| 1407 | - | |||||||||||||||||||||||||
| 1408 | - | |||||||||||||||||||||||||
| 1409 | - | |||||||||||||||||||||||||
| 1410 | ifaces << QLatin1String("org.a11y.atspi.Accessible"); | - | ||||||||||||||||||||||||
| 1411 | - | |||||||||||||||||||||||||
| 1412 |     if ( (
 
  | 0 | ||||||||||||||||||||||||
| 1413 |             (interface->
 
 
 
  | 0 | ||||||||||||||||||||||||
| 1414 |             (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1415 |             (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1416 |             (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1417 |             (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1418 |             (interface->
 
 
 
  | 0 | ||||||||||||||||||||||||
| 1419 | ) { | - | ||||||||||||||||||||||||
| 1420 | ifaces << QLatin1String("org.a11y.atspi.Component"); | - | ||||||||||||||||||||||||
| 1421 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1422 | - | |||||||||||||||||||||||||
| 1423 | - | |||||||||||||||||||||||||
| 1424 | - | |||||||||||||||||||||||||
| 1425 | - | |||||||||||||||||||||||||
| 1426 | - | |||||||||||||||||||||||||
| 1427 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1428 |         ifaces << QLatin1String("org.a11y.atspi.Application"); never executed:  ifaces << QLatin1String("org.a11y.atspi.Application"); | 0 | ||||||||||||||||||||||||
| 1429 | - | |||||||||||||||||||||||||
| 1430 |     if (interface->
 
 
 
  | 0 | ||||||||||||||||||||||||
| 1431 |         ifaces << QLatin1String("org.a11y.atspi.Action"); never executed:  ifaces << QLatin1String("org.a11y.atspi.Action"); | 0 | ||||||||||||||||||||||||
| 1432 | - | |||||||||||||||||||||||||
| 1433 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1434 |         ifaces << QLatin1String("org.a11y.atspi.Text"); never executed:  ifaces << QLatin1String("org.a11y.atspi.Text"); | 0 | ||||||||||||||||||||||||
| 1435 | - | |||||||||||||||||||||||||
| 1436 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1437 |         ifaces << QLatin1String("org.a11y.atspi.EditableText"); never executed:  ifaces << QLatin1String("org.a11y.atspi.EditableText"); | 0 | ||||||||||||||||||||||||
| 1438 | - | |||||||||||||||||||||||||
| 1439 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1440 |         ifaces << QLatin1String("org.a11y.atspi.Value"); never executed:  ifaces << QLatin1String("org.a11y.atspi.Value"); | 0 | ||||||||||||||||||||||||
| 1441 | - | |||||||||||||||||||||||||
| 1442 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1443 |         ifaces << QLatin1String("org.a11y.atspi.Table"); never executed:  ifaces << QLatin1String("org.a11y.atspi.Table"); | 0 | ||||||||||||||||||||||||
| 1444 | - | |||||||||||||||||||||||||
| 1445 |     return never executed:   ifaces;return ifaces;never executed:  return ifaces; | 0 | ||||||||||||||||||||||||
| 1446 | } | - | ||||||||||||||||||||||||
| 1447 | - | |||||||||||||||||||||||||
| 1448 | QSpiRelationArray 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()
  | 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:   relations;return relations;never executed:  return relations; | 0 | ||||||||||||||||||||||||
| 1467 | } | - | ||||||||||||||||||||||||
| 1468 | - | |||||||||||||||||||||||||
| 1469 | void 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 | - | |||||||||||||||||||||||||
| 1476 | QString AtSpiAdaptor::pathForObject(QObject *object) const | - | ||||||||||||||||||||||||
| 1477 | { | - | ||||||||||||||||||||||||
| 1478 | ((!(object)) ? qt_assert("object",__FILE__,1532) : qt_noop()); | - | ||||||||||||||||||||||||
| 1479 | - | |||||||||||||||||||||||||
| 1480 |     if (inheritsQAction(object)
  | 0 | ||||||||||||||||||||||||
| 1481 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1535, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.";;never executed:  QMessageLogger(__FILE__, 1535, __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:   pathForInterface(iface);return pathForInterface(iface);never executed:  return pathForInterface(iface); | 0 | ||||||||||||||||||||||||
| 1486 | } | - | ||||||||||||||||||||||||
| 1487 | - | |||||||||||||||||||||||||
| 1488 | QString AtSpiAdaptor::pathForInterface(QAccessibleInterface *interface) const | - | ||||||||||||||||||||||||
| 1489 | { | - | ||||||||||||||||||||||||
| 1490 |     if (!interface
 
  | 0 | ||||||||||||||||||||||||
| 1491 |         return never executed:   QLatin1String("/org/a11y/atspi/null");return QLatin1String("/org/a11y/atspi/null");never executed:  return QLatin1String("/org/a11y/atspi/null"); | 0 | ||||||||||||||||||||||||
| 1492 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1493 |         return never executed:   QLatin1String("/org/a11y/atspi/accessible/" "root");return 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__,1550) : qt_noop()); | - | ||||||||||||||||||||||||
| 1497 |     return never executed:   QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id);return QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id);never executed:  return QLatin1String("/org/a11y/atspi/accessible/") + QString::number(id); | 0 | ||||||||||||||||||||||||
| 1498 | } | - | ||||||||||||||||||||||||
| 1499 | - | |||||||||||||||||||||||||
| 1500 | bool AtSpiAdaptor::inheritsQAction(QObject *object) | - | ||||||||||||||||||||||||
| 1501 | { | - | ||||||||||||||||||||||||
| 1502 | const QMetaObject *mo = object->metaObject(); | - | ||||||||||||||||||||||||
| 1503 |     while (mo
  | 0 | ||||||||||||||||||||||||
| 1504 | const QLatin1String cn(mo->className()); | - | ||||||||||||||||||||||||
| 1505 |         if (cn == QLatin1String("QAction")
  | 0 | ||||||||||||||||||||||||
| 1506 |             return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1507 | mo = mo->superClass(); | - | ||||||||||||||||||||||||
| 1508 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1509 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1510 | } | - | ||||||||||||||||||||||||
| 1511 | - | |||||||||||||||||||||||||
| 1512 | - | |||||||||||||||||||||||||
| 1513 | static QAccessibleInterface * getWindow(QAccessibleInterface * interface) | - | ||||||||||||||||||||||||
| 1514 | { | - | ||||||||||||||||||||||||
| 1515 |     if (interface->
 
  | 0 | ||||||||||||||||||||||||
| 1516 |         return never executed:   interface;return interface;never executed:  return interface; | 0 | ||||||||||||||||||||||||
| 1517 | - | |||||||||||||||||||||||||
| 1518 | QAccessibleInterface * parent = interface->parent(); | - | ||||||||||||||||||||||||
| 1519 |     while (parent
 
  | 0 | ||||||||||||||||||||||||
| 1520 |         parent = parent->parent(); never executed:  parent = parent->parent(); | 0 | ||||||||||||||||||||||||
| 1521 | - | |||||||||||||||||||||||||
| 1522 |     return never executed:   parent;return parent;never executed:  return parent; | 0 | ||||||||||||||||||||||||
| 1523 | } | - | ||||||||||||||||||||||||
| 1524 | - | |||||||||||||||||||||||||
| 1525 | static 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
  | 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:   cr;return cr;never executed:  return cr; | 0 | ||||||||||||||||||||||||
| 1540 | } | - | ||||||||||||||||||||||||
| 1541 | - | |||||||||||||||||||||||||
| 1542 | bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1543 | { | - | ||||||||||||||||||||||||
| 1544 |     if (function == QLatin1String("Contains")
  | 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
  | 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:   else if (function == QLatin1String("GetAccessibleAtPoint")end of block
  | 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
  | 0 | ||||||||||||||||||||||||
| 1563 | iface = childInterface; | - | ||||||||||||||||||||||||
| 1564 | childInterface = iface->childAt(x, y); | - | ||||||||||||||||||||||||
| 1565 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1566 |         if (iface
  | 0 | ||||||||||||||||||||||||
| 1567 | QString path = pathForInterface(iface); | - | ||||||||||||||||||||||||
| 1568 | sendReply(connection, message, QVariant::fromValue( | - | ||||||||||||||||||||||||
| 1569 | QSpiObjectReference(connection, QDBusObjectPath(path)))); | - | ||||||||||||||||||||||||
| 1570 |         } never executed:   else {end of block | 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")
  | 0 | ||||||||||||||||||||||||
| 1575 | sendReply(connection, message, (double) 1.0); | - | ||||||||||||||||||||||||
| 1576 |     } never executed:   else if (function == QLatin1String("GetExtents")end of block
  | 0 | ||||||||||||||||||||||||
| 1577 | uint coordType = message.arguments().at(0).toUInt(); | - | ||||||||||||||||||||||||
| 1578 | sendReply(connection, message, QVariant::fromValue(getExtents(interface, coordType))); | - | ||||||||||||||||||||||||
| 1579 |     } never executed:   else if (function == QLatin1String("GetLayer")end of block
  | 0 | ||||||||||||||||||||||||
| 1580 | sendReply(connection, message, QVariant::fromValue((uint)1)); | - | ||||||||||||||||||||||||
| 1581 |     } never executed:   else if (function == QLatin1String("GetMDIZOrder")end of block
  | 0 | ||||||||||||||||||||||||
| 1582 | sendReply(connection, message, QVariant::fromValue((short)0)); | - | ||||||||||||||||||||||||
| 1583 |     } never executed:   else if (function == QLatin1String("GetPosition")end of block
  | 0 | ||||||||||||||||||||||||
| 1584 | uint coordType = message.arguments().at(0).toUInt(); | - | ||||||||||||||||||||||||
| 1585 | QRect rect; | - | ||||||||||||||||||||||||
| 1586 |         if (coordType == ATSPI_COORD_TYPE_SCREEN
  | 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:   else if (function == QLatin1String("GetSize")end of block
  | 0 | ||||||||||||||||||||||||
| 1594 | QRect rect = interface->rect(); | - | ||||||||||||||||||||||||
| 1595 | QVariantList size; | - | ||||||||||||||||||||||||
| 1596 | size << rect.width() << rect.height(); | - | ||||||||||||||||||||||||
| 1597 | connection.send(message.createReply(size)); | - | ||||||||||||||||||||||||
| 1598 |     } never executed:   else if (function == QLatin1String("GrabFocus")end of block
  | 0 | ||||||||||||||||||||||||
| 1599 | QAccessibleActionInterface *actionIface = interface->actionInterface(); | - | ||||||||||||||||||||||||
| 1600 |         if (actionIface
 
  | 0 | ||||||||||||||||||||||||
| 1601 | actionIface->doAction(QAccessibleActionInterface::setFocusAction()); | - | ||||||||||||||||||||||||
| 1602 | sendReply(connection, message, true); | - | ||||||||||||||||||||||||
| 1603 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1604 | sendReply(connection, message, false); | - | ||||||||||||||||||||||||
| 1605 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1606 |     } else if (function == QLatin1String("SetExtents")
  | 0 | ||||||||||||||||||||||||
| 1607 | - | |||||||||||||||||||||||||
| 1608 | - | |||||||||||||||||||||||||
| 1609 | - | |||||||||||||||||||||||||
| 1610 | - | |||||||||||||||||||||||||
| 1611 | - | |||||||||||||||||||||||||
| 1612 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1666, __PRETTY_FUNCTION__).debug() << "SetExtents is not implemented.";;never executed:  QMessageLogger(__FILE__, 1666, __PRETTY_FUNCTION__).debug() << "SetExtents is not implemented."; | 0 | ||||||||||||||||||||||||
| 1613 | sendReply(connection, message, false); | - | ||||||||||||||||||||||||
| 1614 |     } never executed:   else if (function == QLatin1String("SetPosition")end of block
  | 0 | ||||||||||||||||||||||||
| 1615 | - | |||||||||||||||||||||||||
| 1616 | - | |||||||||||||||||||||||||
| 1617 | - | |||||||||||||||||||||||||
| 1618 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1672, __PRETTY_FUNCTION__).debug() << "SetPosition is not implemented.";;never executed:  QMessageLogger(__FILE__, 1672, __PRETTY_FUNCTION__).debug() << "SetPosition is not implemented."; | 0 | ||||||||||||||||||||||||
| 1619 | sendReply(connection, message, false); | - | ||||||||||||||||||||||||
| 1620 |     } never executed:   else if (function == QLatin1String("SetSize")end of block
  | 0 | ||||||||||||||||||||||||
| 1621 | - | |||||||||||||||||||||||||
| 1622 | - | |||||||||||||||||||||||||
| 1623 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1677, __PRETTY_FUNCTION__).debug() << "SetSize is not implemented.";;never executed:  QMessageLogger(__FILE__, 1677, __PRETTY_FUNCTION__).debug() << "SetSize is not implemented."; | 0 | ||||||||||||||||||||||||
| 1624 | sendReply(connection, message, false); | - | ||||||||||||||||||||||||
| 1625 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1626 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1680, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::componentInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 1680, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::componentInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 1627 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1628 | } | - | ||||||||||||||||||||||||
| 1629 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1630 | } | - | ||||||||||||||||||||||||
| 1631 | - | |||||||||||||||||||||||||
| 1632 | QRect AtSpiAdaptor::getExtents(QAccessibleInterface *interface, uint coordType) | - | ||||||||||||||||||||||||
| 1633 | { | - | ||||||||||||||||||||||||
| 1634 |     return never executed:   (return (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 | - | |||||||||||||||||||||||||
| 1638 | bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1639 | { | - | ||||||||||||||||||||||||
| 1640 |     if (function == QLatin1String("GetNActions")
  | 0 | ||||||||||||||||||||||||
| 1641 | int count = QAccessibleBridgeUtils::effectiveActionNames(interface).count(); | - | ||||||||||||||||||||||||
| 1642 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(count)))); | - | ||||||||||||||||||||||||
| 1643 |     } never executed:   else if (function == QLatin1String("DoAction")end of block
  | 0 | ||||||||||||||||||||||||
| 1644 | int index = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1645 | const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); | - | ||||||||||||||||||||||||
| 1646 |         if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 1647 |             return never executed:   false;return 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:   else if (function == QLatin1String("GetActions")end of block
  | 0 | ||||||||||||||||||||||||
| 1652 | sendReply(connection, message, QVariant::fromValue(getActions(interface))); | - | ||||||||||||||||||||||||
| 1653 |     } never executed:   else if (function == QLatin1String("GetName")end of block
  | 0 | ||||||||||||||||||||||||
| 1654 | int index = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1655 | const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); | - | ||||||||||||||||||||||||
| 1656 |         if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 1657 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1658 | sendReply(connection, message, actionNames.at(index)); | - | ||||||||||||||||||||||||
| 1659 |     } never executed:   else if (function == QLatin1String("GetDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 1660 | int index = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1661 | const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); | - | ||||||||||||||||||||||||
| 1662 |         if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 1663 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1664 | QString description; | - | ||||||||||||||||||||||||
| 1665 |         if (QAccessibleActionInterface *actionIface = interface->actionInterface()
  | 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:   else if (function == QLatin1String("GetKeyBinding")end of block
  | 0 | ||||||||||||||||||||||||
| 1671 | int index = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1672 | const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); | - | ||||||||||||||||||||||||
| 1673 |         if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 1674 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1675 | QStringList keyBindings; | - | ||||||||||||||||||||||||
| 1676 |         if (QAccessibleActionInterface *actionIface = interface->actionInterface()
  | 0 | ||||||||||||||||||||||||
| 1677 |             keyBindings = actionIface->keyBindingsForAction(actionNames.at(index)); never executed:  keyBindings = actionIface->keyBindingsForAction(actionNames.at(index)); | 0 | ||||||||||||||||||||||||
| 1678 |         if (keyBindings.isEmpty()
  | 0 | ||||||||||||||||||||||||
| 1679 | QString acc = interface->text(QAccessible::Accelerator); | - | ||||||||||||||||||||||||
| 1680 |             if (!acc.isEmpty()
  | 0 | ||||||||||||||||||||||||
| 1681 |                 keyBindings.append(acc); never executed:  keyBindings.append(acc); | 0 | ||||||||||||||||||||||||
| 1682 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1683 |         if (keyBindings.length() > 0
  | 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
 never executed:   else QMessageLogger(__FILE__, 1742, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::actionInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 1742, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::actionInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 1689 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1690 | } | - | ||||||||||||||||||||||||
| 1691 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1692 | } | - | ||||||||||||||||||||||||
| 1693 | - | |||||||||||||||||||||||||
| 1694 | QSpiActionArray 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
  | 0 | ||||||||||||||||||||||||
| 1706 | action.description = actionInterface->localizedActionDescription(actionName); | - | ||||||||||||||||||||||||
| 1707 | keyBindings = actionInterface->keyBindingsForAction(actionName); | - | ||||||||||||||||||||||||
| 1708 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1709 | action.description = qAccessibleLocalizedActionDescription(actionName); | - | ||||||||||||||||||||||||
| 1710 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1711 | - | |||||||||||||||||||||||||
| 1712 |         if (keyBindings.length() > 0
  | 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:   actions;return actions;never executed:  return actions; | 0 | ||||||||||||||||||||||||
| 1720 | } | - | ||||||||||||||||||||||||
| 1721 | - | |||||||||||||||||||||||||
| 1722 | - | |||||||||||||||||||||||||
| 1723 | bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 1724 | { | - | ||||||||||||||||||||||||
| 1725 |     if (!interface->textInterface()
  | 0 | ||||||||||||||||||||||||
| 1726 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1727 | - | |||||||||||||||||||||||||
| 1728 | - | |||||||||||||||||||||||||
| 1729 |     if (function == QLatin1String("GetCaretOffset")
  | 0 | ||||||||||||||||||||||||
| 1730 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->cursorPosition())))); | - | ||||||||||||||||||||||||
| 1731 |     } never executed:   else if (function == QLatin1String("GetCharacterCount")end of block
  | 0 | ||||||||||||||||||||||||
| 1732 | sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->characterCount())))); | - | ||||||||||||||||||||||||
| 1733 | - | |||||||||||||||||||||||||
| 1734 | - | |||||||||||||||||||||||||
| 1735 |     } never executed:   else if (function == QLatin1String("AddSelection")end of block
  | 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:   else if (function == QLatin1String("GetAttributeRun")end of block
  | 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:   else if (function == QLatin1String("GetAttributeValue")end of block
  | 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:   else if (function == QLatin1String("GetAttributes")end of block
  | 0 | ||||||||||||||||||||||||
| 1751 | int offset = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1752 | connection.send(message.createReply(getAttributes(interface, offset, true))); | - | ||||||||||||||||||||||||
| 1753 |     } never executed:   else if (function == QLatin1String("GetBoundedRanges")end of block
  | 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
 never executed:   else QMessageLogger(__FILE__, 1818, __PRETTY_FUNCTION__).debug("Not implemented: QSpiAdaptor::GetBoundedRanges");;never executed:  QMessageLogger(__FILE__, 1818, __PRETTY_FUNCTION__).debug("Not implemented: QSpiAdaptor::GetBoundedRanges"); | 0 | ||||||||||||||||||||||||
| 1765 | sendReply(connection, message, QVariant::fromValue(QSpiTextRangeList())); | - | ||||||||||||||||||||||||
| 1766 |     } never executed:   else if (function == QLatin1String("GetCharacterAtOffset")end of block
  | 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:   else if (function == QLatin1String("GetCharacterExtents")end of block
  | 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:   else if (function == QLatin1String("GetDefaultAttributeSet")end of block
 
  | 0 | ||||||||||||||||||||||||
| 1777 | - | |||||||||||||||||||||||||
| 1778 | - | |||||||||||||||||||||||||
| 1779 | sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet())); | - | ||||||||||||||||||||||||
| 1780 |     } never executed:   else if (function == QLatin1String("GetNSelections")end of block
  | 0 | ||||||||||||||||||||||||
| 1781 | sendReply(connection, message, interface->textInterface()->selectionCount()); | - | ||||||||||||||||||||||||
| 1782 |     } never executed:   else if (function == QLatin1String("GetOffsetAtPoint")end of block
  | 0 | ||||||||||||||||||||||||
| 1783 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1837, __PRETTY_FUNCTION__).debug() << message.signature();;never executed:  QMessageLogger(__FILE__, 1837, __PRETTY_FUNCTION__).debug() << message.signature(); | 0 | ||||||||||||||||||||||||
| 1784 | ((!(!message.signature().isEmpty())) ? qt_assert("!message.signature().isEmpty()",__FILE__,1838) : 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
  | 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:   else if (function == QLatin1String("GetRangeExtents")end of block
  | 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:   else if (function == QLatin1String("GetSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 1799 | int selectionNum = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1800 | int start, end; | - | ||||||||||||||||||||||||
| 1801 | interface->textInterface()->selection(selectionNum, &start, &end); | - | ||||||||||||||||||||||||
| 1802 |         if (start < 0
  | 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:   else if (function == QLatin1String("GetText")end of block
  | 0 | ||||||||||||||||||||||||
| 1808 | int startOffset = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1809 | int endOffset = message.arguments().at(1).toInt(); | - | ||||||||||||||||||||||||
| 1810 |         if (endOffset == -1
  | 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:   else if (function == QLatin1String("GetTextAfterOffset")end of block
  | 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:   else if (function == QLatin1String("GetTextAtOffset")end of block
  | 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:   else if (function == QLatin1String("GetTextBeforeOffset")end of block
  | 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:   else if (function == QLatin1String("RemoveSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 1838 | int selectionNum = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1839 | interface->textInterface()->removeSelection(selectionNum); | - | ||||||||||||||||||||||||
| 1840 | sendReply(connection, message, true); | - | ||||||||||||||||||||||||
| 1841 |     } never executed:   else if (function == QLatin1String("SetCaretOffset")end of block
  | 0 | ||||||||||||||||||||||||
| 1842 | int offset = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 1843 | interface->textInterface()->setCursorPosition(offset); | - | ||||||||||||||||||||||||
| 1844 | sendReply(connection, message, true); | - | ||||||||||||||||||||||||
| 1845 |     } never executed:   else if (function == QLatin1String("SetSelection")end of block
  | 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:   else {end of block | 0 | ||||||||||||||||||||||||
| 1852 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1906, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::textInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 1906, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::textInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 1853 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 1854 | } | - | ||||||||||||||||||||||||
| 1855 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 1856 | } | - | ||||||||||||||||||||||||
| 1857 | - | |||||||||||||||||||||||||
| 1858 | QAccessible::TextBoundaryType AtSpiAdaptor::qAccessibleBoundaryType(int atspiTextBoundaryType) const | - | ||||||||||||||||||||||||
| 1859 | { | - | ||||||||||||||||||||||||
| 1860 | switch (atspiTextBoundaryType) { | - | ||||||||||||||||||||||||
| 1861 |     case never executed:   ATSPI_TEXT_BOUNDARY_CHAR:case ATSPI_TEXT_BOUNDARY_CHAR:never executed:  case ATSPI_TEXT_BOUNDARY_CHAR: | 0 | ||||||||||||||||||||||||
| 1862 |         return never executed:   QAccessible::CharBoundary;return QAccessible::CharBoundary;never executed:  return QAccessible::CharBoundary; | 0 | ||||||||||||||||||||||||
| 1863 |     case never executed:   ATSPI_TEXT_BOUNDARY_WORD_START:case ATSPI_TEXT_BOUNDARY_WORD_START:never executed:  case ATSPI_TEXT_BOUNDARY_WORD_START: | 0 | ||||||||||||||||||||||||
| 1864 |     case never executed:   ATSPI_TEXT_BOUNDARY_WORD_END:case ATSPI_TEXT_BOUNDARY_WORD_END:never executed:  case ATSPI_TEXT_BOUNDARY_WORD_END: | 0 | ||||||||||||||||||||||||
| 1865 |         return never executed:   QAccessible::WordBoundary;return QAccessible::WordBoundary;never executed:  return QAccessible::WordBoundary; | 0 | ||||||||||||||||||||||||
| 1866 |     case never executed:   ATSPI_TEXT_BOUNDARY_SENTENCE_START:case ATSPI_TEXT_BOUNDARY_SENTENCE_START:never executed:  case ATSPI_TEXT_BOUNDARY_SENTENCE_START: | 0 | ||||||||||||||||||||||||
| 1867 |     case never executed:   ATSPI_TEXT_BOUNDARY_SENTENCE_END:case ATSPI_TEXT_BOUNDARY_SENTENCE_END:never executed:  case ATSPI_TEXT_BOUNDARY_SENTENCE_END: | 0 | ||||||||||||||||||||||||
| 1868 |         return never executed:   QAccessible::SentenceBoundary;return QAccessible::SentenceBoundary;never executed:  return QAccessible::SentenceBoundary; | 0 | ||||||||||||||||||||||||
| 1869 |     case never executed:   ATSPI_TEXT_BOUNDARY_LINE_START:case ATSPI_TEXT_BOUNDARY_LINE_START:never executed:  case ATSPI_TEXT_BOUNDARY_LINE_START: | 0 | ||||||||||||||||||||||||
| 1870 |     case never executed:   ATSPI_TEXT_BOUNDARY_LINE_END:case ATSPI_TEXT_BOUNDARY_LINE_END:never executed:  case ATSPI_TEXT_BOUNDARY_LINE_END: | 0 | ||||||||||||||||||||||||
| 1871 |         return never executed:   QAccessible::LineBoundary;return QAccessible::LineBoundary;never executed:  return QAccessible::LineBoundary; | 0 | ||||||||||||||||||||||||
| 1872 | } | - | ||||||||||||||||||||||||
| 1873 | ((!(0)) ? qt_assert_x("", "Requested invalid boundary type.",__FILE__,1927) : qt_noop()); | - | ||||||||||||||||||||||||
| 1874 |     return never executed:   QAccessible::CharBoundary;return QAccessible::CharBoundary;never executed:  return QAccessible::CharBoundary; | 0 | ||||||||||||||||||||||||
| 1875 | } | - | ||||||||||||||||||||||||
| 1876 | - | |||||||||||||||||||||||||
| 1877 | namespace | - | ||||||||||||||||||||||||
| 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:   name.isNull()return 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:   ia2Color.mid(4, ia2Color.length() - (4+1));return 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:   ia2Size.left(ia2Size.length() - 2);return 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")
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1904 | value = atspiColor(value); | - | ||||||||||||||||||||||||
| 1905 |         } never executed:   else if (ia2Name == QLatin1String("font-family")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1907 |         } never executed:   else if (ia2Name == QLatin1String("color")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1909 | value = atspiColor(value); | - | ||||||||||||||||||||||||
| 1910 |         } never executed:   else if (ia2Name == QLatin1String("text-align")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1912 |             if (value == QLatin1String("justify")
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1914 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1915 |                 if (value != QLatin1String("left")
  | 0 | ||||||||||||||||||||||||
| 1916 |                     value != QLatin1String("right")
  | 0 | ||||||||||||||||||||||||
| 1917 |                     value != QLatin1String("center")
  | 0 | ||||||||||||||||||||||||
| 1918 | ) { | - | ||||||||||||||||||||||||
| 1919 | value = QString(); | - | ||||||||||||||||||||||||
| 1920 |                     if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1982, __PRETTY_FUNCTION__).debug() << "Unknown text-align attribute value \"" << value << "\" cannot be translated to AT-SPI.";;never executed:  QMessageLogger(__FILE__, 1982, __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")
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1925 | value = atspiSize(value); | - | ||||||||||||||||||||||||
| 1926 |         } never executed:   else if (ia2Name == QLatin1String("font-style")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1928 |             if (value != QLatin1String("normal")
  | 0 | ||||||||||||||||||||||||
| 1929 |                 value != QLatin1String("italic")
  | 0 | ||||||||||||||||||||||||
| 1930 |                 value != QLatin1String("oblique")
  | 0 | ||||||||||||||||||||||||
| 1931 | ) { | - | ||||||||||||||||||||||||
| 1932 | value = QString(); | - | ||||||||||||||||||||||||
| 1933 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 1995, __PRETTY_FUNCTION__).debug() << "Unknown font-style attribute value \"" << value << "\" cannot be translated to AT-SPI.";;never executed:  QMessageLogger(__FILE__, 1995, __PRETTY_FUNCTION__).debug() << "Unknown font-style attribute value \"" << value << "\" cannot be translated to AT-SPI."; | 0 | ||||||||||||||||||||||||
| 1934 | } | - | ||||||||||||||||||||||||
| 1935 |         } never executed:   else if (ia2Name == QLatin1String("text-underline-type")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1937 |             if (value != QLatin1String("none")
  | 0 | ||||||||||||||||||||||||
| 1938 |                 value != QLatin1String("single")
  | 0 | ||||||||||||||||||||||||
| 1939 |                 value != QLatin1String("double")
  | 0 | ||||||||||||||||||||||||
| 1940 | ) { | - | ||||||||||||||||||||||||
| 1941 | value = QString(); | - | ||||||||||||||||||||||||
| 1942 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2004, __PRETTY_FUNCTION__).debug() << "Unknown text-underline-type attribute value \"" << value << "\" cannot be translated to AT-SPI.";;never executed:  QMessageLogger(__FILE__, 2004, __PRETTY_FUNCTION__).debug() << "Unknown text-underline-type attribute value \"" << value << "\" cannot be translated to AT-SPI."; | 0 | ||||||||||||||||||||||||
| 1943 | } | - | ||||||||||||||||||||||||
| 1944 |         } never executed:   else if (ia2Name == QLatin1String("font-weight")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1946 |             if (value == QLatin1String("normal")
  | 0 | ||||||||||||||||||||||||
| 1947 | - | |||||||||||||||||||||||||
| 1948 | - | |||||||||||||||||||||||||
| 1949 | - | |||||||||||||||||||||||||
| 1950 |                 value = QString(); never executed:  value = QString(); | 0 | ||||||||||||||||||||||||
| 1951 |         } never executed:   else if (ia2Name == QLatin1String("text-position")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1953 |             if (value != QLatin1String("baseline")
  | 0 | ||||||||||||||||||||||||
| 1954 |                 value != QLatin1String("super")
  | 0 | ||||||||||||||||||||||||
| 1955 |                 value != QLatin1String("sub")
  | 0 | ||||||||||||||||||||||||
| 1956 | ) { | - | ||||||||||||||||||||||||
| 1957 | value = QString(); | - | ||||||||||||||||||||||||
| 1958 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2020, __PRETTY_FUNCTION__).debug() << "Unknown text-position attribute value \"" << value << "\" cannot be translated to AT-SPI.";;never executed:  QMessageLogger(__FILE__, 2020, __PRETTY_FUNCTION__).debug() << "Unknown text-position attribute value \"" << value << "\" cannot be translated to AT-SPI."; | 0 | ||||||||||||||||||||||||
| 1959 | } | - | ||||||||||||||||||||||||
| 1960 |         } never executed:   else if (ia2Name == QLatin1String("writing-mode")end of block
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1962 |             if (value == QLatin1String("lr")
  | 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:   qstring_literal_temp;return 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")
  | 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:   qstring_literal_temp;return 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")
  | 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:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 1969 |                 if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2031, __PRETTY_FUNCTION__).debug() << "writing-mode attribute value \"tb\" translated only w.r.t. horizontal direction; vertical direction ignored";;never executed:  QMessageLogger(__FILE__, 2031, __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
 never executed:   else QMessageLogger(__FILE__, 2034, __PRETTY_FUNCTION__).debug() << "Unknown writing-mode attribute value \"" << value << "\" cannot be translated to AT-SPI.";;never executed:  QMessageLogger(__FILE__, 2034, __PRETTY_FUNCTION__).debug() << "Unknown writing-mode attribute value \"" << value << "\" cannot be translated to AT-SPI."; | 0 | ||||||||||||||||||||||||
| 1973 | } | - | ||||||||||||||||||||||||
| 1974 |         } else if (ia2Name == QLatin1String("language")
  | 0 | ||||||||||||||||||||||||
| 1975 | - | |||||||||||||||||||||||||
| 1976 |         } never executed:   else if (ia2Name == QLatin1String("invalid")end of block
  | 0 | ||||||||||||||||||||||||
| 1977 | - | |||||||||||||||||||||||||
| 1978 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1979 | - | |||||||||||||||||||||||||
| 1980 | name = QString(); | - | ||||||||||||||||||||||||
| 1981 | value = QString(); | - | ||||||||||||||||||||||||
| 1982 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1983 |         return never executed:   AtSpiAttribute(name, value);return AtSpiAttribute(name, value);never executed:  return AtSpiAttribute(name, value); | 0 | ||||||||||||||||||||||||
| 1984 | } | - | ||||||||||||||||||||||||
| 1985 | } | - | ||||||||||||||||||||||||
| 1986 | - | |||||||||||||||||||||||||
| 1987 | - | |||||||||||||||||||||||||
| 1988 | QVariantList 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()
  | 0 | ||||||||||||||||||||||||
| 2003 |             set[ never executed:  attribute.name] = attribute.value;set[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:   list;return list;never executed:  return list; | 0 | ||||||||||||||||||||||||
| 2010 | } | - | ||||||||||||||||||||||||
| 2011 | - | |||||||||||||||||||||||||
| 2012 | QVariantList 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()
  | 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:   list;return list;never executed:  return list; | 0 | ||||||||||||||||||||||||
| 2035 | } | - | ||||||||||||||||||||||||
| 2036 | - | |||||||||||||||||||||||||
| 2037 | QList<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
  | 0 | ||||||||||||||||||||||||
| 2042 |         rect = translateRectToWindowCoordinates(interface, rect); never executed:  rect = translateRectToWindowCoordinates(interface, rect); | 0 | ||||||||||||||||||||||||
| 2043 | - | |||||||||||||||||||||||||
| 2044 |     return never executed:   QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();return 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 | - | |||||||||||||||||||||||||
| 2047 | QList<QVariant> AtSpiAdaptor::getRangeExtents(QAccessibleInterface *interface, | - | ||||||||||||||||||||||||
| 2048 | int startOffset, int endOffset, uint coordType) const | - | ||||||||||||||||||||||||
| 2049 | { | - | ||||||||||||||||||||||||
| 2050 |     if (endOffset == -1
  | 0 | ||||||||||||||||||||||||
| 2051 |         endOffset = interface->textInterface()->characterCount(); never executed:  endOffset = interface->textInterface()->characterCount(); | 0 | ||||||||||||||||||||||||
| 2052 | - | |||||||||||||||||||||||||
| 2053 | QAccessibleTextInterface *textInterface = interface->textInterface(); | - | ||||||||||||||||||||||||
| 2054 |     if (endOffset <= startOffset
 
  | 0 | ||||||||||||||||||||||||
| 2055 |         return never executed:   QList<QVariant>() << -1 << -1 << 0 << 0;return 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
  | 0 | ||||||||||||||||||||||||
| 2059 |         rect = rect | textInterface->characterRect(i); never executed:  rect = rect | textInterface->characterRect(i); | 0 | ||||||||||||||||||||||||
| 2060 | - | |||||||||||||||||||||||||
| 2061 | - | |||||||||||||||||||||||||
| 2062 |     if (coordType == ATSPI_COORD_TYPE_WINDOW
  | 0 | ||||||||||||||||||||||||
| 2063 |         rect = translateRectToWindowCoordinates(interface, rect); never executed:  rect = translateRectToWindowCoordinates(interface, rect); | 0 | ||||||||||||||||||||||||
| 2064 | - | |||||||||||||||||||||||||
| 2065 |     return never executed:   QList<QVariant>() << rect.x() << rect.y() << rect.width() << rect.height();return 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 | - | |||||||||||||||||||||||||
| 2068 | QRect AtSpiAdaptor::translateRectToWindowCoordinates(QAccessibleInterface *interface, const QRect &rect) | - | ||||||||||||||||||||||||
| 2069 | { | - | ||||||||||||||||||||||||
| 2070 | QAccessibleInterface * window = getWindow(interface); | - | ||||||||||||||||||||||||
| 2071 |     if (window
  | 0 | ||||||||||||||||||||||||
| 2072 |         return never executed:   rect.translated(-window->rect().x(), -window->rect().y());return 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:   rect;return rect;never executed:  return rect; | 0 | ||||||||||||||||||||||||
| 2075 | } | - | ||||||||||||||||||||||||
| 2076 | - | |||||||||||||||||||||||||
| 2077 | - | |||||||||||||||||||||||||
| 2078 | - | |||||||||||||||||||||||||
| 2079 | static QString textForRange(QAccessibleInterface *accessible, int startOffset, int endOffset) | - | ||||||||||||||||||||||||
| 2080 | { | - | ||||||||||||||||||||||||
| 2081 |     if (QAccessibleTextInterface *textIface = accessible->textInterface()
  | 0 | ||||||||||||||||||||||||
| 2082 |         if (endOffset == -1
  | 0 | ||||||||||||||||||||||||
| 2083 |             endOffset = textIface->characterCount(); never executed:  endOffset = textIface->characterCount(); | 0 | ||||||||||||||||||||||||
| 2084 |         return never executed:   textIface->text(startOffset, endOffset);return textIface->text(startOffset, endOffset);never executed:  return textIface->text(startOffset, endOffset); | 0 | ||||||||||||||||||||||||
| 2085 | } | - | ||||||||||||||||||||||||
| 2086 | QString txt = accessible->text(QAccessible::Value); | - | ||||||||||||||||||||||||
| 2087 |     if (endOffset == -1
  | 0 | ||||||||||||||||||||||||
| 2088 |         endOffset = txt.length(); never executed:  endOffset = txt.length(); | 0 | ||||||||||||||||||||||||
| 2089 |     return never executed:   txt.mid(startOffset, endOffset - startOffset);return txt.mid(startOffset, endOffset - startOffset);never executed:  return txt.mid(startOffset, endOffset - startOffset); | 0 | ||||||||||||||||||||||||
| 2090 | } | - | ||||||||||||||||||||||||
| 2091 | - | |||||||||||||||||||||||||
| 2092 | static void replaceTextFallback(QAccessibleInterface *accessible, long startOffset, long endOffset, const QString &txt) | - | ||||||||||||||||||||||||
| 2093 | { | - | ||||||||||||||||||||||||
| 2094 | QString t = textForRange(accessible, 0, -1); | - | ||||||||||||||||||||||||
| 2095 |     if (endOffset == -1
  | 0 | ||||||||||||||||||||||||
| 2096 |         endOffset = t.length(); never executed:  endOffset = t.length(); | 0 | ||||||||||||||||||||||||
| 2097 |     if (endOffset - startOffset == 0
  | 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 | - | |||||||||||||||||||||||||
| 2104 | bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 2105 | { | - | ||||||||||||||||||||||||
| 2106 |     if (function == QLatin1String("CopyText")
  | 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:   else if (function == QLatin1String("CutText")end of block
  | 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()
  | 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:   else if (function == QLatin1String("DeleteText")end of block
  | 0 | ||||||||||||||||||||||||
| 2127 | int startOffset = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2128 | int endOffset = message.arguments().at(1).toInt(); | - | ||||||||||||||||||||||||
| 2129 |         if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
  | 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:   else if (function == QLatin1String("InsertText")end of block
  | 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()
  | 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:   else if (function == QLatin1String("PasteText")end of block
  | 0 | ||||||||||||||||||||||||
| 2145 | - | |||||||||||||||||||||||||
| 2146 | int position = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2147 | const QString txt = QGuiApplication::clipboard()->text(); | - | ||||||||||||||||||||||||
| 2148 |         if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
  | 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:   else if (function == QLatin1String("SetTextContents")end of block
  | 0 | ||||||||||||||||||||||||
| 2155 | QString newContents = message.arguments().at(0).toString(); | - | ||||||||||||||||||||||||
| 2156 |         if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()
  | 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:   else if (function == QLatin1String("")end of block
  | 0 | ||||||||||||||||||||||||
| 2162 | connection.send(message.createReply()); | - | ||||||||||||||||||||||||
| 2163 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 2164 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2226, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::editableTextInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 2226, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::editableTextInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 2165 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2166 | } | - | ||||||||||||||||||||||||
| 2167 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 2168 | } | - | ||||||||||||||||||||||||
| 2169 | - | |||||||||||||||||||||||||
| 2170 | - | |||||||||||||||||||||||||
| 2171 | bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 2172 | { | - | ||||||||||||||||||||||||
| 2173 | QAccessibleValueInterface *valueIface = interface->valueInterface(); | - | ||||||||||||||||||||||||
| 2174 |     if (!valueIface
  | 0 | ||||||||||||||||||||||||
| 2175 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2176 | - | |||||||||||||||||||||||||
| 2177 |     if (function == QLatin1String("SetCurrentValue")
  | 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:   else {end of block | 0 | ||||||||||||||||||||||||
| 2185 | QVariant value; | - | ||||||||||||||||||||||||
| 2186 |         if (function == QLatin1String("GetCurrentValue")
  | 0 | ||||||||||||||||||||||||
| 2187 |             value = valueIface->currentValue(); never executed:  value = valueIface->currentValue(); | 0 | ||||||||||||||||||||||||
| 2188 |         else if (function == QLatin1String("GetMaximumValue")
  | 0 | ||||||||||||||||||||||||
| 2189 |             value = valueIface->maximumValue(); never executed:  value = valueIface->maximumValue(); | 0 | ||||||||||||||||||||||||
| 2190 |         else if (function == QLatin1String("GetMinimumIncrement")
  | 0 | ||||||||||||||||||||||||
| 2191 |             value = valueIface->minimumStepSize(); never executed:  value = valueIface->minimumStepSize(); | 0 | ||||||||||||||||||||||||
| 2192 |         else if (function == QLatin1String("GetMinimumValue")
  | 0 | ||||||||||||||||||||||||
| 2193 |             value = valueIface->minimumValue(); never executed:  value = valueIface->minimumValue(); | 0 | ||||||||||||||||||||||||
| 2194 | else { | - | ||||||||||||||||||||||||
| 2195 |             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2257, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 2257, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 2196 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2197 | } | - | ||||||||||||||||||||||||
| 2198 |         if (!value.canConvert(QVariant::Double)
  | 0 | ||||||||||||||||||||||||
| 2199 |             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2261, __PRETTY_FUNCTION__).debug() << "AtSpiAdaptor::valueInterface: Could not convert to double: " << function;;never executed:  QMessageLogger(__FILE__, 2261, __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:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 2208 | } | - | ||||||||||||||||||||||||
| 2209 | - | |||||||||||||||||||||||||
| 2210 | - | |||||||||||||||||||||||||
| 2211 | bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) | - | ||||||||||||||||||||||||
| 2212 | { | - | ||||||||||||||||||||||||
| 2213 |     if (!(interface->
 
 
 
  | 0 | ||||||||||||||||||||||||
| 2214 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2276, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find table interface for: " << message.path() << interface;;never executed:  QMessageLogger(__FILE__, 2276, __PRETTY_FUNCTION__).debug() << "WARNING Qt AtSpiAdaptor: Could not find table interface for: " << message.path() << interface; | 0 | ||||||||||||||||||||||||
| 2215 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2216 | } | - | ||||||||||||||||||||||||
| 2217 | - | |||||||||||||||||||||||||
| 2218 |     if (0) { dead code:  { } | - | ||||||||||||||||||||||||
| 2219 | - | |||||||||||||||||||||||||
| 2220 |     } dead code:   else if (function == QLatin1String("GetCaption"){ }
  | - | ||||||||||||||||||||||||
| 2221 | QAccessibleInterface * captionInterface= interface->tableInterface()->caption(); | - | ||||||||||||||||||||||||
| 2222 |         if (captionInterface
  | 0 | ||||||||||||||||||||||||
| 2223 | QSpiObjectReference ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(captionInterface))); | - | ||||||||||||||||||||||||
| 2224 | sendReply(connection, message, QVariant::fromValue(ref)); | - | ||||||||||||||||||||||||
| 2225 |         } never executed:   else {end of block | 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")
  | 0 | ||||||||||||||||||||||||
| 2230 | connection.send(message.createReply(QVariant::fromValue(QDBusVariant( | - | ||||||||||||||||||||||||
| 2231 | QVariant::fromValue(interface->tableInterface()->columnCount()))))); | - | ||||||||||||||||||||||||
| 2232 |     } never executed:   else if (function == QLatin1String("GetNRows")end of block
  | 0 | ||||||||||||||||||||||||
| 2233 | connection.send(message.createReply(QVariant::fromValue(QDBusVariant( | - | ||||||||||||||||||||||||
| 2234 | QVariant::fromValue(interface->tableInterface()->rowCount()))))); | - | ||||||||||||||||||||||||
| 2235 |     } never executed:   else if (function == QLatin1String("GetNSelectedColumns")end of block
  | 0 | ||||||||||||||||||||||||
| 2236 | connection.send(message.createReply(QVariant::fromValue(QDBusVariant( | - | ||||||||||||||||||||||||
| 2237 | QVariant::fromValue(interface->tableInterface()->selectedColumnCount()))))); | - | ||||||||||||||||||||||||
| 2238 |     } never executed:   else if (function == QLatin1String("GetNSelectedRows")end of block
  | 0 | ||||||||||||||||||||||||
| 2239 | connection.send(message.createReply(QVariant::fromValue(QDBusVariant( | - | ||||||||||||||||||||||||
| 2240 | QVariant::fromValue(interface->tableInterface()->selectedRowCount()))))); | - | ||||||||||||||||||||||||
| 2241 |     } never executed:   else if (function == QLatin1String("GetSummary")end of block
  | 0 | ||||||||||||||||||||||||
| 2242 |         QAccessibleInterface * summary = interface->
 
  | 0 | ||||||||||||||||||||||||
| 2243 | QSpiObjectReference ref(connection, QDBusObjectPath(pathForInterface(summary))); | - | ||||||||||||||||||||||||
| 2244 | connection.send(message.createReply(QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref))))); | - | ||||||||||||||||||||||||
| 2245 |     } never executed:   else if (function == QLatin1String("GetAccessibleAt")end of block
  | 0 | ||||||||||||||||||||||||
| 2246 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2247 | int column = message.arguments().at(1).toInt(); | - | ||||||||||||||||||||||||
| 2248 |         if ((
 
  | 0 | ||||||||||||||||||||||||
| 2249 |             (
 
  | 0 | ||||||||||||||||||||||||
| 2250 |             (
 
  | 0 | ||||||||||||||||||||||||
| 2251 |             (
 
  | 0 | ||||||||||||||||||||||||
| 2252 |             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2314, __PRETTY_FUNCTION__).debug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ')';;never executed:  QMessageLogger(__FILE__, 2314, __PRETTY_FUNCTION__).debug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ')'; | 0 | ||||||||||||||||||||||||
| 2253 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2254 | } | - | ||||||||||||||||||||||||
| 2255 | - | |||||||||||||||||||||||||
| 2256 | QSpiObjectReference ref; | - | ||||||||||||||||||||||||
| 2257 | QAccessibleInterface * cell(interface->tableInterface()->cellAt(row, column)); | - | ||||||||||||||||||||||||
| 2258 |         if (cell
  | 0 | ||||||||||||||||||||||||
| 2259 | ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(cell))); | - | ||||||||||||||||||||||||
| 2260 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 2261 |             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2323, __PRETTY_FUNCTION__).debug() << "WARNING: no cell interface returned for " << interface->object() << row << column;;never executed:  QMessageLogger(__FILE__, 2323, __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:   else if (function == QLatin1String("GetIndexAt")end of block
  | 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
  | 0 | ||||||||||||||||||||||||
| 2271 |             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2333, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << ',' << column << ") did not find a cell. " << interface;;never executed:  QMessageLogger(__FILE__, 2333, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << ',' << column << ") did not find a cell. " << interface; | 0 | ||||||||||||||||||||||||
| 2272 |             return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2273 | } | - | ||||||||||||||||||||||||
| 2274 | int index = interface->indexOfChild(cell); | - | ||||||||||||||||||||||||
| 2275 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2337, __PRETTY_FUNCTION__).debug() << "QSpiAdaptor::GetIndexAt row:" << row << " col:" << column << " logical index:" << index;;never executed:  QMessageLogger(__FILE__, 2337, __PRETTY_FUNCTION__).debug() << "QSpiAdaptor::GetIndexAt row:" << row << " col:" << column << " logical index:" << index; | 0 | ||||||||||||||||||||||||
| 2276 | ((!(index > 0)) ? qt_assert("index > 0",__FILE__,2338) : qt_noop()); | - | ||||||||||||||||||||||||
| 2277 | connection.send(message.createReply(index)); | - | ||||||||||||||||||||||||
| 2278 |     } never executed:   else if ((end of block
 
 
 
  | 0 | ||||||||||||||||||||||||
| 2279 | int index = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2280 | int ret = -1; | - | ||||||||||||||||||||||||
| 2281 |         if (index >= 0
  | 0 | ||||||||||||||||||||||||
| 2282 | QAccessibleInterface * cell = interface->child(index); | - | ||||||||||||||||||||||||
| 2283 |             if (cell
  | 0 | ||||||||||||||||||||||||
| 2284 |                 if (function == QLatin1String("GetColumnAtIndex")
  | 0 | ||||||||||||||||||||||||
| 2285 |                     if (cell->role() == QAccessible::ColumnHeader
  | 0 | ||||||||||||||||||||||||
| 2286 | ret = index; | - | ||||||||||||||||||||||||
| 2287 |                     } never executed:   else if (cell->role() == QAccessible::RowHeaderend of block
  | 0 | ||||||||||||||||||||||||
| 2288 | ret = -1; | - | ||||||||||||||||||||||||
| 2289 |                     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 2290 |                         if (!cell->tableCellInterface()
  | 0 | ||||||||||||||||||||||||
| 2291 |                             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2353, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;;never executed:  QMessageLogger(__FILE__, 2353, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell; | 0 | ||||||||||||||||||||||||
| 2292 |                             return never executed:   false;return 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
  | 0 | ||||||||||||||||||||||||
| 2298 | ret = -1; | - | ||||||||||||||||||||||||
| 2299 |                     } never executed:   else if (cell->role() == QAccessible::RowHeaderend of block
  | 0 | ||||||||||||||||||||||||
| 2300 | ret = index % interface->tableInterface()->columnCount(); | - | ||||||||||||||||||||||||
| 2301 |                     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 2302 |                         if (!cell->tableCellInterface()
  | 0 | ||||||||||||||||||||||||
| 2303 |                             if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2365, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell;;never executed:  QMessageLogger(__FILE__, 2365, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No table cell interface: " << cell; | 0 | ||||||||||||||||||||||||
| 2304 |                             return never executed:   false;return 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
 never executed:   else QMessageLogger(__FILE__, 2372, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No cell at index: " << index << interface;;never executed:  QMessageLogger(__FILE__, 2372, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::" << function << " No cell at index: " << index << interface; | 0 | ||||||||||||||||||||||||
| 2311 |                 return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2312 | } | - | ||||||||||||||||||||||||
| 2313 | } | - | ||||||||||||||||||||||||
| 2314 | connection.send(message.createReply(ret)); | - | ||||||||||||||||||||||||
| 2315 | - | |||||||||||||||||||||||||
| 2316 |     } never executed:   else if (function == QLatin1String("GetColumnDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 2317 | int column = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2318 | connection.send(message.createReply(interface->tableInterface()->columnDescription(column))); | - | ||||||||||||||||||||||||
| 2319 |     } never executed:   else if (function == QLatin1String("GetRowDescription")end of block
  | 0 | ||||||||||||||||||||||||
| 2320 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2321 | connection.send(message.createReply(interface->tableInterface()->rowDescription(row))); | - | ||||||||||||||||||||||||
| 2322 | - | |||||||||||||||||||||||||
| 2323 | - | |||||||||||||||||||||||||
| 2324 | - | |||||||||||||||||||||||||
| 2325 |     } never executed:   else if (function == QLatin1String("GetRowColumnExtentsAtIndex")end of block
  | 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
  | 0 | ||||||||||||||||||||||||
| 2337 | row = index / cols; | - | ||||||||||||||||||||||||
| 2338 | col = index % cols; | - | ||||||||||||||||||||||||
| 2339 | QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, col)->tableCellInterface(); | - | ||||||||||||||||||||||||
| 2340 |             if (cell
  | 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:   else if (function == QLatin1String("GetColumnExtentAt")end of block
  | 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:   else if (function == QLatin1String("GetRowExtentAt")end of block
  | 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:   else if (function == QLatin1String("GetColumnHeader")end of block
  | 0 | ||||||||||||||||||||||||
| 2364 | int column = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2365 | QSpiObjectReference ref; | - | ||||||||||||||||||||||||
| 2366 | - | |||||||||||||||||||||||||
| 2367 | QAccessibleInterface * cell(interface->tableInterface()->cellAt(0, column)); | - | ||||||||||||||||||||||||
| 2368 |         if (cell
 
  | 0 | ||||||||||||||||||||||||
| 2369 | QList<QAccessibleInterface*> header = cell->tableCellInterface()->columnHeaderCells(); | - | ||||||||||||||||||||||||
| 2370 |             if (header.size() > 0
  | 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:   else if (function == QLatin1String("GetRowHeader")end of block
  | 0 | ||||||||||||||||||||||||
| 2377 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2378 | QSpiObjectReference ref; | - | ||||||||||||||||||||||||
| 2379 | QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, 0)->tableCellInterface(); | - | ||||||||||||||||||||||||
| 2380 |         if (cell
  | 0 | ||||||||||||||||||||||||
| 2381 | QList<QAccessibleInterface*> header = cell->rowHeaderCells(); | - | ||||||||||||||||||||||||
| 2382 |             if (header.size() > 0
  | 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:   else if (function == QLatin1String("GetSelectedColumns")end of block
  | 0 | ||||||||||||||||||||||||
| 2389 | connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedColumns()))); | - | ||||||||||||||||||||||||
| 2390 |     } never executed:   else if (function == QLatin1String("GetSelectedRows")end of block
  | 0 | ||||||||||||||||||||||||
| 2391 | connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedRows()))); | - | ||||||||||||||||||||||||
| 2392 |     } never executed:   else if (function == QLatin1String("IsColumnSelected")end of block
  | 0 | ||||||||||||||||||||||||
| 2393 | int column = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2394 | connection.send(message.createReply(interface->tableInterface()->isColumnSelected(column))); | - | ||||||||||||||||||||||||
| 2395 |     } never executed:   else if (function == QLatin1String("IsRowSelected")end of block
  | 0 | ||||||||||||||||||||||||
| 2396 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2397 | connection.send(message.createReply(interface->tableInterface()->isRowSelected(row))); | - | ||||||||||||||||||||||||
| 2398 |     } never executed:   else if (function == QLatin1String("IsSelected")end of block
  | 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:   else if (function == QLatin1String("AddColumnSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 2404 | int column = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2405 | connection.send(message.createReply(interface->tableInterface()->selectColumn(column))); | - | ||||||||||||||||||||||||
| 2406 |     } never executed:   else if (function == QLatin1String("AddRowSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 2407 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2408 | connection.send(message.createReply(interface->tableInterface()->selectRow(row))); | - | ||||||||||||||||||||||||
| 2409 |     } never executed:   else if (function == QLatin1String("RemoveColumnSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 2410 | int column = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2411 | connection.send(message.createReply(interface->tableInterface()->unselectColumn(column))); | - | ||||||||||||||||||||||||
| 2412 |     } never executed:   else if (function == QLatin1String("RemoveRowSelection")end of block
  | 0 | ||||||||||||||||||||||||
| 2413 | int row = message.arguments().at(0).toInt(); | - | ||||||||||||||||||||||||
| 2414 | connection.send(message.createReply(interface->tableInterface()->unselectRow(row))); | - | ||||||||||||||||||||||||
| 2415 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 2416 |         if (!::isDebugging
 never executed:   else QMessageLogger(__FILE__, 2478, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::tableInterface does not implement " << function << message.path();;never executed:  QMessageLogger(__FILE__, 2478, __PRETTY_FUNCTION__).debug() << "WARNING: AtSpiAdaptor::tableInterface does not implement " << function << message.path(); | 0 | ||||||||||||||||||||||||
| 2417 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||
| 2418 | } | - | ||||||||||||||||||||||||
| 2419 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||
| 2420 | } | - | ||||||||||||||||||||||||
| 2421 | - | |||||||||||||||||||||||||
| 2422 | - | |||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |