qaccessible.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/accessible/qaccessible.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QAccessibleInterface::~QAccessibleInterface()-
6{-
7}-
8namespace { namespace Q_QGS_loader { typedef QFactoryLoader Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QAccessibleFactoryInterface", QLatin1String("/accessible")))) : value ("org.qt-project.Qt.QAccessibleFactoryInterface", QLatin1String("/accessible")) { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;
0
9-
10typedef QHash<QString, QAccessiblePlugin*> QAccessiblePluginsHash;-
11namespace { namespace Q_QGS_qAccessiblePlugins { typedef QAccessiblePluginsHash Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QAccessiblePluginsHash, Q_QGS_qAccessiblePlugins::innerFunction, Q_QGS_qAccessiblePlugins::guard> qAccessiblePlugins;
0
12-
13-
14-
15namespace { namespace Q_QGS_qAccessibleFactories { typedef QList<QAccessible::InterfaceFactory> Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QList<QAccessible::InterfaceFactory>, Q_QGS_qAccessibleFactories::innerFunction, Q_QGS_qAccessibleFactories::guard> qAccessibleFactories;
0
16namespace { namespace Q_QGS_qAccessibleActivationObservers { typedef QList<QAccessible::ActivationObserver *> Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QList<QAccessible::ActivationObserver *>, Q_QGS_qAccessibleActivationObservers::innerFunction, Q_QGS_qAccessibleActivationObservers::guard> qAccessibleActivationObservers;
0
17-
18QAccessible::UpdateHandler QAccessible::updateHandler = 0;-
19QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;-
20-
21static bool cleanupAdded = false;-
22-
23static QPlatformAccessibility *platformAccessibility()-
24{-
25 QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();-
26 return
never executed: return pfIntegration ? pfIntegration->accessibility() : 0;
pfIntegration
pfIntegrationDescription
TRUEnever evaluated
FALSEnever evaluated
? pfIntegration->accessibility() : 0;
never executed: return pfIntegration ? pfIntegration->accessibility() : 0;
0
27}-
28void QAccessible::cleanup()-
29{-
30 if (QPlatformAccessibility *pfAccessibility = platformAccessibility()
QPlatformAcces...ccessibility()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
31 pfAccessibility->cleanup();
never executed: pfAccessibility->cleanup();
0
32}
never executed: end of block
0
33-
34static void qAccessibleCleanup()-
35{-
36 qAccessibleActivationObservers()->clear();-
37 qAccessibleFactories()->clear();-
38}
never executed: end of block
0
39void QAccessible::installFactory(InterfaceFactory factory)-
40{-
41 if (!factory
!factoryDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
42 return;
never executed: return;
0
43-
44 if (!cleanupAdded
!cleanupAddedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
45 qAddPostRoutine(qAccessibleCleanup);-
46 cleanupAdded = true;-
47 }
never executed: end of block
0
48 if (qAccessibleFactories()->contains(factory)
qAccessibleFac...tains(factory)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
49 return;
never executed: return;
0
50 qAccessibleFactories()->append(factory);-
51}
never executed: end of block
0
52-
53-
54-
55-
56void QAccessible::removeFactory(InterfaceFactory factory)-
57{-
58 qAccessibleFactories()->removeAll(factory);-
59}
never executed: end of block
0
60QAccessible::UpdateHandler QAccessible::installUpdateHandler(UpdateHandler handler)-
61{-
62 UpdateHandler old = updateHandler;-
63 updateHandler = handler;-
64 return
never executed: return old;
old;
never executed: return old;
0
65}-
66-
67-
68-
69-
70-
71-
72-
73QAccessible::RootObjectHandler QAccessible::installRootObjectHandler(RootObjectHandler handler)-
74{-
75 RootObjectHandler old = rootObjectHandler;-
76 rootObjectHandler = handler;-
77 return
never executed: return old;
old;
never executed: return old;
0
78}-
79QAccessible::ActivationObserver::~ActivationObserver()-
80{-
81-
82}-
83-
84-
85-
86-
87-
88-
89void QAccessible::installActivationObserver(QAccessible::ActivationObserver *observer)-
90{-
91 if (!observer
!observerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
92 return;
never executed: return;
0
93-
94 if (!cleanupAdded
!cleanupAddedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
95 qAddPostRoutine(qAccessibleCleanup);-
96 cleanupAdded = true;-
97 }
never executed: end of block
0
98 if (qAccessibleActivationObservers()->contains(observer)
qAccessibleAct...ains(observer)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
99 return;
never executed: return;
0
100 qAccessibleActivationObservers()->append(observer);-
101}
never executed: end of block
0
102-
103-
104-
105-
106-
107-
108-
109void QAccessible::removeActivationObserver(ActivationObserver *observer)-
110{-
111 qAccessibleActivationObservers()->removeAll(observer);-
112}
never executed: end of block
0
113QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)-
114{-
115 if (!object
!objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
116 return
never executed: return 0;
0;
never executed: return 0;
0
117-
118 if (Id id = QAccessibleCache::instance()->objectToId.value(object)
Id id = QAcces....value(object)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
119 return
never executed: return QAccessibleCache::instance()->interfaceForId(id);
QAccessibleCache::instance()->interfaceForId(id);
never executed: return QAccessibleCache::instance()->interfaceForId(id);
0
120-
121-
122-
123 const QMetaObject *mo = object->metaObject();-
124 while (mo
moDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
125 const QString cn = QLatin1String(mo->className());-
126-
127-
128 for (int i = qAccessibleFactories()->count(); i > 0
i > 0Description
TRUEnever evaluated
FALSEnever evaluated
; --i) {
0
129 InterfaceFactory factory = qAccessibleFactories()->at(i - 1);-
130 if (QAccessibleInterface *iface = factory(cn, object)
QAccessibleInt...ry(cn, object)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
131 QAccessibleCache::instance()->insert(object, iface);-
132 ((!(QAccessibleCache::instance()->objectToId.contains(object))) ? qt_assert("QAccessibleCache::instance()->objectToId.contains(object)",__FILE__,683) : qt_noop());-
133 return
never executed: return iface;
iface;
never executed: return iface;
0
134 }-
135 }
never executed: end of block
0
136-
137-
138-
139 if (!qAccessiblePlugins()->contains(cn)
!qAccessiblePl...->contains(cn)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
140 QAccessiblePlugin *factory = 0;-
141 const int index = loader()->indexOf(cn);-
142 if (index != -1
index != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
143 factory = qobject_cast<QAccessiblePlugin *>(loader()->instance(index));
never executed: factory = qobject_cast<QAccessiblePlugin *>(loader()->instance(index));
0
144 qAccessiblePlugins()->insert(cn, factory);-
145 }
never executed: end of block
0
146-
147-
148 ((!(qAccessiblePlugins()->contains(cn))) ? qt_assert("qAccessiblePlugins()->contains(cn)",__FILE__,699) : qt_noop());-
149 QAccessiblePlugin *factory = qAccessiblePlugins()->value(cn);-
150 if (factory
factoryDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
151 QAccessibleInterface *result = factory->create(cn, object);-
152 if (result
resultDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
153 QAccessibleCache::instance()->insert(object, result);-
154 ((!(QAccessibleCache::instance()->objectToId.contains(object))) ? qt_assert("QAccessibleCache::instance()->objectToId.contains(object)",__FILE__,705) : qt_noop());-
155 }
never executed: end of block
0
156 return
never executed: return result;
result;
never executed: return result;
0
157 }-
158-
159 mo = mo->superClass();-
160 }
never executed: end of block
0
161-
162 if (object == (static_cast<QGuiApplication *>(QCoreApplication::instance()))
object == (sta...::instance()))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
163 QAccessibleInterface *appInterface = new QAccessibleApplication;-
164 QAccessibleCache::instance()->insert(object, appInterface);-
165 ((!(QAccessibleCache::instance()->objectToId.contains((static_cast<QGuiApplication *>(QCoreApplication::instance()))))) ? qt_assert("QAccessibleCache::instance()->objectToId.contains(qApp)",__FILE__,716) : qt_noop());-
166 return
never executed: return appInterface;
appInterface;
never executed: return appInterface;
0
167 }-
168-
169 return
never executed: return 0;
0;
never executed: return 0;
0
170}-
171QAccessible::Id QAccessible::registerAccessibleInterface(QAccessibleInterface *iface)-
172{-
173 ((!(iface)) ? qt_assert("iface",__FILE__,739) : qt_noop());-
174 return
never executed: return QAccessibleCache::instance()->insert(iface->object(), iface);
QAccessibleCache::instance()->insert(iface->object(), iface);
never executed: return QAccessibleCache::instance()->insert(iface->object(), iface);
0
175}-
176-
177-
178-
179-
180-
181-
182void QAccessible::deleteAccessibleInterface(Id id)-
183{-
184 QAccessibleCache::instance()->deleteInterface(id);-
185}
never executed: end of block
0
186-
187-
188-
189-
190QAccessible::Id QAccessible::uniqueId(QAccessibleInterface *iface)-
191{-
192 Id id = QAccessibleCache::instance()->idForInterface(iface);-
193 if (!id
!idDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
194 id = registerAccessibleInterface(iface);
never executed: id = registerAccessibleInterface(iface);
0
195 return
never executed: return id;
id;
never executed: return id;
0
196}-
197-
198-
199-
200-
201-
202-
203QAccessibleInterface *QAccessible::accessibleInterface(Id id)-
204{-
205 return
never executed: return QAccessibleCache::instance()->interfaceForId(id);
QAccessibleCache::instance()->interfaceForId(id);
never executed: return QAccessibleCache::instance()->interfaceForId(id);
0
206}-
207bool QAccessible::isActive()-
208{-
209 if (QPlatformAccessibility *pfAccessibility = platformAccessibility()
QPlatformAcces...ccessibility()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
210 return
never executed: return pfAccessibility->isActive();
pfAccessibility->isActive();
never executed: return pfAccessibility->isActive();
0
211 return
never executed: return false;
false;
never executed: return false;
0
212}-
213-
214-
215-
216-
217void QAccessible::setActive(bool active)-
218{-
219 for (int i = 0; i < qAccessibleActivationObservers()->count()
i < qAccessibl...ers()->count()Description
TRUEnever evaluated
FALSEnever evaluated
;++i)
0
220 qAccessibleActivationObservers()->at(i)->accessibilityActiveChanged(active);
never executed: qAccessibleActivationObservers()->at(i)->accessibilityActiveChanged(active);
0
221}
never executed: end of block
0
222void QAccessible::setRootObject(QObject *object)-
223{-
224 if (rootObjectHandler
rootObjectHandlerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
225 rootObjectHandler(object);-
226 return;
never executed: return;
0
227 }-
228-
229 if (QPlatformAccessibility *pfAccessibility = platformAccessibility()
QPlatformAcces...ccessibility()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
230 pfAccessibility->setRootObject(object);
never executed: pfAccessibility->setRootObject(object);
0
231}
never executed: end of block
0
232void QAccessible::updateAccessibility(QAccessibleEvent *event)-
233{-
234-
235-
236-
237-
238-
239-
240 QAccessibleInterface *iface = event->accessibleInterface();-
241 if (isActive()
isActive()Description
TRUEnever evaluated
FALSEnever evaluated
&& iface
ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
242 if (event->type() == QAccessible::TableModelChanged
event->type() ...leModelChangedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
243 if (iface->tableInterface()
iface->tableInterface()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
244 iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
never executed: iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
0
245 }
never executed: end of block
0
246-
247 if (updateHandler
updateHandlerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
248 updateHandler(event);-
249 return;
never executed: return;
0
250 }-
251 }
never executed: end of block
0
252-
253 if (QPlatformAccessibility *pfAccessibility = platformAccessibility()
QPlatformAcces...ccessibility()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
254 pfAccessibility->notifyAccessibilityUpdate(event);
never executed: pfAccessibility->notifyAccessibilityUpdate(event);
0
255}
never executed: end of block
0
256QPair< int, int > QAccessible::qAccessibleTextBoundaryHelper(const QTextCursor &offsetCursor, TextBoundaryType boundaryType)-
257{-
258 ((!(!offsetCursor.isNull())) ? qt_assert("!offsetCursor.isNull()",__FILE__,890) : qt_noop());-
259-
260 QTextCursor endCursor = offsetCursor;-
261 endCursor.movePosition(QTextCursor::End);-
262 int characterCount = endCursor.position();-
263-
264 QPair<int, int> result;-
265 QTextCursor cursor = offsetCursor;-
266 switch (boundaryType) {-
267 case
never executed: case CharBoundary:
CharBoundary:
never executed: case CharBoundary:
0
268 result.first = cursor.position();-
269 cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor);-
270 result.second = cursor.position();-
271 break;
never executed: break;
0
272 case
never executed: case WordBoundary:
WordBoundary:
never executed: case WordBoundary:
0
273 cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);-
274 result.first = cursor.position();-
275 cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);-
276 result.second = cursor.position();-
277 break;
never executed: break;
0
278 case
never executed: case SentenceBoundary:
SentenceBoundary:
never executed: case SentenceBoundary:
{
0
279-
280-
281-
282 cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);-
283 result.first = cursor.position();-
284 cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);-
285 result.second = cursor.position();-
286 QString blockText = cursor.selectedText();-
287 const int offsetWithinBlockText = offsetCursor.position() - result.first;-
288 QTextBoundaryFinder sentenceFinder(QTextBoundaryFinder::Sentence, blockText);-
289 sentenceFinder.setPosition(offsetWithinBlockText);-
290 int prevBoundary = offsetWithinBlockText;-
291 int nextBoundary = offsetWithinBlockText;-
292 if (!(sentenceFinder.boundaryReasons() & QTextBoundaryFinder::StartOfItem)
!(sentenceFind...::StartOfItem)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
293 prevBoundary = sentenceFinder.toPreviousBoundary();
never executed: prevBoundary = sentenceFinder.toPreviousBoundary();
0
294 nextBoundary = sentenceFinder.toNextBoundary();-
295 if (nextBoundary != -1
nextBoundary != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
296 result.second = result.first + nextBoundary;
never executed: result.second = result.first + nextBoundary;
0
297 if (prevBoundary != -1
prevBoundary != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
298 result.first += prevBoundary;
never executed: result.first += prevBoundary;
0
299 break;
never executed: break;
}
0
300 case
never executed: case LineBoundary:
LineBoundary:
never executed: case LineBoundary:
0
301 cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);-
302 result.first = cursor.position();-
303 cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);-
304 result.second = cursor.position();-
305 break;
never executed: break;
0
306 case
never executed: case ParagraphBoundary:
ParagraphBoundary:
never executed: case ParagraphBoundary:
0
307 cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);-
308 result.first = cursor.position();-
309 cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);-
310 result.second = cursor.position();-
311 break;
never executed: break;
0
312 case
never executed: case NoBoundary:
NoBoundary:
never executed: case NoBoundary:
0
313 result.first = 0;-
314 result.second = characterCount;-
315 break;
never executed: break;
0
316 }-
317 return
never executed: return result;
result;
never executed: return result;
0
318}-
319QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >-
320QAccessibleInterface::relations(QAccessible::Relation ) const-
321{-
322 return
never executed: return QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >();
QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >();
never executed: return QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >();
0
323}-
324-
325-
326-
327-
328-
329-
330QAccessibleInterface *QAccessibleInterface::focusChild() const-
331{-
332 return
never executed: return 0;
0;
never executed: return 0;
0
333}-
334QColor QAccessibleInterface::foregroundColor() const-
335{-
336 return
never executed: return QColor();
QColor();
never executed: return QColor();
0
337}-
338-
339-
340-
341-
342-
343-
344QColor QAccessibleInterface::backgroundColor() const-
345{-
346 return
never executed: return QColor();
QColor();
never executed: return QColor();
0
347}-
348QAccessibleEvent::~QAccessibleEvent()-
349{-
350-
351}-
352QAccessible::Id QAccessibleEvent::uniqueId() const-
353{-
354 if (!m_object
!m_objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
355 return
never executed: return m_uniqueId;
m_uniqueId;
never executed: return m_uniqueId;
0
356 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);-
357 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
358 return
never executed: return 0;
0;
never executed: return 0;
0
359 if (m_child != -1
m_child != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
360 iface = iface->child(m_child);
never executed: iface = iface->child(m_child);
0
361 return
never executed: return QAccessible::uniqueId(iface);
QAccessible::uniqueId(iface);
never executed: return QAccessible::uniqueId(iface);
0
362}-
363QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()-
364{-
365-
366}-
367QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()-
368{-
369-
370}-
371QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()-
372{-
373-
374}-
375QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()-
376{-
377-
378}-
379QAccessibleTextInsertEvent::~QAccessibleTextInsertEvent()-
380{-
381-
382}-
383QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()-
384{-
385-
386}-
387QAccessibleTextUpdateEvent::~QAccessibleTextUpdateEvent()-
388{-
389-
390}-
391QAccessibleTextSelectionEvent::~QAccessibleTextSelectionEvent()-
392{-
393-
394}-
395-
396-
397-
398-
399-
400-
401-
402QAccessibleInterface *QAccessibleEvent::accessibleInterface() const-
403{-
404 if (m_object == 0
m_object == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
405 return
never executed: return QAccessible::accessibleInterface(m_uniqueId);
QAccessible::accessibleInterface(m_uniqueId);
never executed: return QAccessible::accessibleInterface(m_uniqueId);
0
406-
407 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);-
408 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
|| !iface->isValid()
!iface->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
409 return
never executed: return 0;
0;
never executed: return 0;
0
410-
411 if (m_child >= 0
m_child >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
412 QAccessibleInterface *child = iface->child(m_child);-
413 if (child
childDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
414 iface = child;-
415 }
never executed: end of block
else {
0
416 QMessageLogger(__FILE__, 1769, __PRETTY_FUNCTION__).warning() << "Cannot creat accessible child interface for object: " << m_object << " index: " << m_child;-
417 }
never executed: end of block
0
418 }-
419 return
never executed: return iface;
iface;
never executed: return iface;
0
420}-
421QWindow *QAccessibleInterface::window() const-
422{-
423 return
never executed: return 0;
0;
never executed: return 0;
0
424}-
425void QAccessibleInterface::virtual_hook(int , void * )-
426{-
427}-
428const char *qAccessibleRoleString(QAccessible::Role role)-
429{-
430 if (role >= QAccessible::UserRole
role >= QAccessible::UserRoleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
431 role = QAccessible::UserRole;
never executed: role = QAccessible::UserRole;
0
432 static int roleEnum = QAccessible::staticMetaObject.indexOfEnumerator("Role");-
433 return
never executed: return QAccessible::staticMetaObject.enumerator(roleEnum).valueToKey(role);
QAccessible::staticMetaObject.enumerator(roleEnum).valueToKey(role);
never executed: return QAccessible::staticMetaObject.enumerator(roleEnum).valueToKey(role);
0
434}-
435-
436-
437const char *qAccessibleEventString(QAccessible::Event event)-
438{-
439 static int eventEnum = QAccessible::staticMetaObject.indexOfEnumerator("Event");-
440 return
never executed: return QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event);
QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event);
never executed: return QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event);
0
441}-
442-
443-
444bool operator==(const QAccessible::State &first, const QAccessible::State &second)-
445{-
446 return
never executed: return memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
never executed: return memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
0
447}-
448-
449-
450-
451__attribute__((visibility("default"))) QDebug operator<<(QDebug d, const QAccessibleInterface *iface)-
452{-
453 QDebugStateSaver saver(d);-
454 if (!iface
!ifaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
455 d << "QAccessibleInterface(null)";-
456 return
never executed: return d;
d;
never executed: return d;
0
457 }-
458 d.nospace();-
459 d << "QAccessibleInterface(" << hex << (const void *) iface << dec;-
460 if (iface->isValid()
iface->isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
461 d << " name=" << iface->text(QAccessible::Name) << ' ';-
462 d << "role=" << qAccessibleRoleString(iface->role()) << ' ';-
463 if (iface->childCount()
iface->childCount()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
464 d << "childc=" << iface->childCount() << ' ';
never executed: d << "childc=" << iface->childCount() << ' ';
0
465 if (iface->object()
iface->object()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
466 d << "obj=" << iface->object();-
467 }
never executed: end of block
0
468 QStringList stateStrings;-
469 QAccessible::State st = iface->state();-
470 if (st.focusable
st.focusableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
471 stateStrings << QLatin1String("focusable");
never executed: stateStrings << QLatin1String("focusable");
0
472 if (st.focused
st.focusedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
473 stateStrings << QLatin1String("focused");
never executed: stateStrings << QLatin1String("focused");
0
474 if (st.selected
st.selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
475 stateStrings << QLatin1String("selected");
never executed: stateStrings << QLatin1String("selected");
0
476 if (st.invisible
st.invisibleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
477 stateStrings << QLatin1String("invisible");
never executed: stateStrings << QLatin1String("invisible");
0
478-
479 if (!stateStrings.isEmpty()
!stateStrings.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
480 d << stateStrings.join(QLatin1Char('|'));
never executed: d << stateStrings.join(QLatin1Char('|'));
0
481-
482 if (!st.invisible
!st.invisibleDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
483 d << "rect=" << iface->rect();
never executed: d << "rect=" << iface->rect();
0
484-
485 }
never executed: end of block
else {
0
486 d << " invalid";-
487 }
never executed: end of block
0
488 d << ')';-
489 return
never executed: return d;
d;
never executed: return d;
0
490}-
491-
492-
493QDebug operator<<(QDebug d, const QAccessibleEvent &ev)-
494{-
495 QDebugStateSaver saver(d);-
496 d.nospace() << "QAccessibleEvent(";-
497 if (ev.object()
ev.object()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
498 d.nospace() << "object=" << hex << ev.object() << dec;-
499 d.nospace() << "child=" << ev.child();-
500 }
never executed: end of block
else {
0
501 d.nospace() << "no object, uniqueId=" << ev.uniqueId();-
502 }
never executed: end of block
0
503 d << " event=" << qAccessibleEventString(ev.type());-
504 if (ev.type() == QAccessible::StateChanged
ev.type() == Q...::StateChangedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
505 QAccessible::State changed = static_cast<const QAccessibleStateChangeEvent*>(&ev)->changedStates();-
506 d << "State changed:";-
507 if (changed.disabled
changed.disabledDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "disabled";
never executed: d << "disabled";
0
508 if (changed.selected
changed.selectedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "selected";
never executed: d << "selected";
0
509 if (changed.focusable
changed.focusableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "focusable";
never executed: d << "focusable";
0
510 if (changed.focused
changed.focusedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "focused";
never executed: d << "focused";
0
511 if (changed.pressed
changed.pressedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "pressed";
never executed: d << "pressed";
0
512 if (changed.checkable
changed.checkableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "checkable";
never executed: d << "checkable";
0
513 if (changed.checked
changed.checkedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "checked";
never executed: d << "checked";
0
514 if (changed.checkStateMixed
changed.checkStateMixedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "checkStateMixed";
never executed: d << "checkStateMixed";
0
515 if (changed.readOnly
changed.readOnlyDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "readOnly";
never executed: d << "readOnly";
0
516 if (changed.hotTracked
changed.hotTrackedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "hotTracked";
never executed: d << "hotTracked";
0
517 if (changed.defaultButton
changed.defaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "defaultButton";
never executed: d << "defaultButton";
0
518 if (changed.expanded
changed.expandedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "expanded";
never executed: d << "expanded";
0
519 if (changed.collapsed
changed.collapsedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "collapsed";
never executed: d << "collapsed";
0
520 if (changed.busy
changed.busyDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "busy";
never executed: d << "busy";
0
521 if (changed.expandable
changed.expandableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "expandable";
never executed: d << "expandable";
0
522 if (changed.marqueed
changed.marqueedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "marqueed";
never executed: d << "marqueed";
0
523 if (changed.animated
changed.animatedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "animated";
never executed: d << "animated";
0
524 if (changed.invisible
changed.invisibleDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "invisible";
never executed: d << "invisible";
0
525 if (changed.offscreen
changed.offscreenDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "offscreen";
never executed: d << "offscreen";
0
526 if (changed.sizeable
changed.sizeableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "sizeable";
never executed: d << "sizeable";
0
527 if (changed.movable
changed.movableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "movable";
never executed: d << "movable";
0
528 if (changed.selfVoicing
changed.selfVoicingDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "selfVoicing";
never executed: d << "selfVoicing";
0
529 if (changed.selectable
changed.selectableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "selectable";
never executed: d << "selectable";
0
530 if (changed.linked
changed.linkedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "linked";
never executed: d << "linked";
0
531 if (changed.traversed
changed.traversedDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "traversed";
never executed: d << "traversed";
0
532 if (changed.multiSelectable
changed.multiSelectableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "multiSelectable";
never executed: d << "multiSelectable";
0
533 if (changed.extSelectable
changed.extSelectableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "extSelectable";
never executed: d << "extSelectable";
0
534 if (changed.passwordEdit
changed.passwordEditDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "passwordEdit";
never executed: d << "passwordEdit";
0
535 if (changed.hasPopup
changed.hasPopupDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "hasPopup";
never executed: d << "hasPopup";
0
536 if (changed.modal
changed.modalDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "modal";
never executed: d << "modal";
0
537-
538-
539-
540 if (changed.active
changed.activeDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "active";
never executed: d << "active";
0
541 if (changed.invalid
changed.invalidDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "invalid";
never executed: d << "invalid";
0
542 if (changed.editable
changed.editableDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "editable";
never executed: d << "editable";
0
543 if (changed.multiLine
changed.multiLineDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "multiLine";
never executed: d << "multiLine";
0
544 if (changed.selectableText
changed.selectableTextDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "selectableText";
never executed: d << "selectableText";
0
545 if (changed.supportsAutoCompletion
changed.supportsAutoCompletionDescription
TRUEnever evaluated
FALSEnever evaluated
) d << "supportsAutoCompletion";
never executed: d << "supportsAutoCompletion";
0
546-
547 }
never executed: end of block
0
548 d << ')';-
549 return
never executed: return d;
d;
never executed: return d;
0
550}-
551QAccessibleTextInterface::~QAccessibleTextInterface()-
552{-
553-
554}-
555static QString textLineBoundary(int beforeAtAfter, const QString &text, int offset, int *startOffset, int *endOffset)-
556{-
557 ((!(beforeAtAfter >= -1 && beforeAtAfter <= 1)) ? qt_assert("beforeAtAfter >= -1 && beforeAtAfter <= 1",__FILE__,2056) : qt_noop());-
558 ((!(*startOffset == -1 && *endOffset == -1)) ? qt_assert("*startOffset == -1 && *endOffset == -1",__FILE__,2057) : qt_noop());-
559 int length = text.length();-
560 ((!(offset >= 0 && offset <= length)) ? qt_assert("offset >= 0 && offset <= length",__FILE__,2059) : qt_noop());-
561-
562-
563 if (beforeAtAfter == 1
beforeAtAfter == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
564 offset = text.indexOf(QChar::LineFeed, qMin(offset, length - 1));-
565 if (offset < 0
offset < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
566 return
never executed: return QString();
QString();
never executed: return QString();
0
567 ++offset;-
568 }
never executed: end of block
else if (beforeAtAfter == -1
beforeAtAfter == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
569 offset = text.lastIndexOf(QChar::LineFeed, qMax(offset - 1, 0));-
570 if (offset < 0
offset < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
571 return
never executed: return QString();
QString();
never executed: return QString();
0
572 }
never executed: end of block
0
573-
574 if (offset > 0
offset > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
575 *
never executed: *startOffset = text.lastIndexOf(QChar::LineFeed, offset - 1);
startOffset = text.lastIndexOf(QChar::LineFeed, offset - 1);
never executed: *startOffset = text.lastIndexOf(QChar::LineFeed, offset - 1);
0
576 ++*startOffset;-
577-
578 *endOffset = text.indexOf(QChar::LineFeed, qMin(offset, length - 1)) + 1;-
579 if (*
*endOffset <= 0Description
TRUEnever evaluated
FALSEnever evaluated
endOffset <= 0
*endOffset <= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| *
*endOffset > lengthDescription
TRUEnever evaluated
FALSEnever evaluated
endOffset > length
*endOffset > lengthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
580 *
never executed: *endOffset = length;
endOffset = length;
never executed: *endOffset = length;
0
581-
582 return
never executed: return text.mid(*startOffset, *endOffset - *startOffset);
text.mid(*startOffset, *endOffset - *startOffset);
never executed: return text.mid(*startOffset, *endOffset - *startOffset);
0
583}-
584QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType,-
585 int *startOffset, int *endOffset) const-
586{-
587 const QString txt = text(0, characterCount());-
588-
589 if (offset == -1
offset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
590 offset = txt.length();
never executed: offset = txt.length();
0
591-
592 *startOffset = *endOffset = -1;-
593 if (txt.isEmpty()
txt.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| offset <= 0
offset <= 0Description
TRUEnever evaluated
FALSEnever evaluated
|| offset > txt.length()
offset > txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
594 return
never executed: return QString();
QString();
never executed: return QString();
0
595-
596-
597 QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;-
598 switch (boundaryType) {-
599 case
never executed: case QAccessible::CharBoundary:
QAccessible::CharBoundary:
never executed: case QAccessible::CharBoundary:
0
600 type = QTextBoundaryFinder::Grapheme;-
601 break;
never executed: break;
0
602 case
never executed: case QAccessible::WordBoundary:
QAccessible::WordBoundary:
never executed: case QAccessible::WordBoundary:
0
603 type = QTextBoundaryFinder::Word;-
604 break;
never executed: break;
0
605 case
never executed: case QAccessible::SentenceBoundary:
QAccessible::SentenceBoundary:
never executed: case QAccessible::SentenceBoundary:
0
606 type = QTextBoundaryFinder::Sentence;-
607 break;
never executed: break;
0
608 case
never executed: case QAccessible::LineBoundary:
QAccessible::LineBoundary:
never executed: case QAccessible::LineBoundary:
0
609 case
never executed: case QAccessible::ParagraphBoundary:
QAccessible::ParagraphBoundary:
never executed: case QAccessible::ParagraphBoundary:
0
610-
611 return
never executed: return textLineBoundary(-1, txt, offset, startOffset, endOffset);
textLineBoundary(-1, txt, offset, startOffset, endOffset);
never executed: return textLineBoundary(-1, txt, offset, startOffset, endOffset);
0
612 case
never executed: case QAccessible::NoBoundary:
QAccessible::NoBoundary:
never executed: case QAccessible::NoBoundary:
0
613-
614 return
never executed: return QString();
QString();
never executed: return QString();
0
615 default
never executed: default:
:
never executed: default:
0
616 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,2133) : qt_noop()); __builtin_unreachable(); } while (0);-
617 }
never executed: end of block
0
618-
619-
620-
621 QTextBoundaryFinder boundary(type, txt);-
622 boundary.setPosition(offset);-
623-
624 do {-
625 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
626 break;
never executed: break;
0
627 }
never executed: end of block
while (boundary.toPreviousBoundary() > 0
boundary.toPre...Boundary() > 0Description
TRUEnever evaluated
FALSEnever evaluated
);
0
628 ((!(boundary.position() >= 0)) ? qt_assert("boundary.position() >= 0",__FILE__,2145) : qt_noop());-
629 *endOffset = boundary.position();-
630-
631 while (boundary.toPreviousBoundary() > 0
boundary.toPre...Boundary() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
632 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
633 break;
never executed: break;
0
634 }
never executed: end of block
0
635 ((!(boundary.position() >= 0)) ? qt_assert("boundary.position() >= 0",__FILE__,2152) : qt_noop());-
636 *startOffset = boundary.position();-
637-
638 return
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
txt.mid(*startOffset, *endOffset - *startOffset);
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
0
639}-
640QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType,-
641 int *startOffset, int *endOffset) const-
642{-
643 const QString txt = text(0, characterCount());-
644-
645 if (offset == -1
offset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
646 offset = txt.length();
never executed: offset = txt.length();
0
647-
648 *startOffset = *endOffset = -1;-
649 if (txt.isEmpty()
txt.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| offset < 0
offset < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| offset >= txt.length()
offset >= txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
650 return
never executed: return QString();
QString();
never executed: return QString();
0
651-
652-
653 QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;-
654 switch (boundaryType) {-
655 case
never executed: case QAccessible::CharBoundary:
QAccessible::CharBoundary:
never executed: case QAccessible::CharBoundary:
0
656 type = QTextBoundaryFinder::Grapheme;-
657 break;
never executed: break;
0
658 case
never executed: case QAccessible::WordBoundary:
QAccessible::WordBoundary:
never executed: case QAccessible::WordBoundary:
0
659 type = QTextBoundaryFinder::Word;-
660 break;
never executed: break;
0
661 case
never executed: case QAccessible::SentenceBoundary:
QAccessible::SentenceBoundary:
never executed: case QAccessible::SentenceBoundary:
0
662 type = QTextBoundaryFinder::Sentence;-
663 break;
never executed: break;
0
664 case
never executed: case QAccessible::LineBoundary:
QAccessible::LineBoundary:
never executed: case QAccessible::LineBoundary:
0
665 case
never executed: case QAccessible::ParagraphBoundary:
QAccessible::ParagraphBoundary:
never executed: case QAccessible::ParagraphBoundary:
0
666-
667 return
never executed: return textLineBoundary(1, txt, offset, startOffset, endOffset);
textLineBoundary(1, txt, offset, startOffset, endOffset);
never executed: return textLineBoundary(1, txt, offset, startOffset, endOffset);
0
668 case
never executed: case QAccessible::NoBoundary:
QAccessible::NoBoundary:
never executed: case QAccessible::NoBoundary:
0
669-
670 return
never executed: return QString();
QString();
never executed: return QString();
0
671 default
never executed: default:
:
never executed: default:
0
672 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,2207) : qt_noop()); __builtin_unreachable(); } while (0);-
673 }
never executed: end of block
0
674-
675-
676-
677 QTextBoundaryFinder boundary(type, txt);-
678 boundary.setPosition(offset);-
679-
680 while (true) {-
681 int toNext = boundary.toNextBoundary();-
682 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
683 break;
never executed: break;
0
684 if (toNext < 0
toNext < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| toNext >= txt.length()
toNext >= txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
685 break;
never executed: break;
0
686 }
never executed: end of block
0
687 ((!(boundary.position() <= txt.length())) ? qt_assert("boundary.position() <= txt.length()",__FILE__,2222) : qt_noop());-
688 *startOffset = boundary.position();-
689-
690 while (true) {-
691 int toNext = boundary.toNextBoundary();-
692 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
693 break;
never executed: break;
0
694 if (toNext < 0
toNext < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| toNext >= txt.length()
toNext >= txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
695 break;
never executed: break;
0
696 }
never executed: end of block
0
697 ((!(boundary.position() <= txt.length())) ? qt_assert("boundary.position() <= txt.length()",__FILE__,2232) : qt_noop());-
698 *endOffset = boundary.position();-
699-
700 if ((*
(*startOffset == -1)Description
TRUEnever evaluated
FALSEnever evaluated
startOffset == -1)
(*startOffset == -1)Description
TRUEnever evaluated
FALSEnever evaluated
|| (*
(*endOffset == -1)Description
TRUEnever evaluated
FALSEnever evaluated
endOffset == -1)
(*endOffset == -1)Description
TRUEnever evaluated
FALSEnever evaluated
|| (*
(*startOffset == *endOffset)Description
TRUEnever evaluated
FALSEnever evaluated
startOffset == *endOffset)
(*startOffset == *endOffset)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
701 *endOffset = -1;-
702 *startOffset = -1;-
703 }
never executed: end of block
0
704-
705 return
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
txt.mid(*startOffset, *endOffset - *startOffset);
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
0
706}-
707QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType,-
708 int *startOffset, int *endOffset) const-
709{-
710 const QString txt = text(0, characterCount());-
711-
712 if (offset == -1
offset == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
713 offset = txt.length();
never executed: offset = txt.length();
0
714-
715 *startOffset = *endOffset = -1;-
716 if (txt.isEmpty()
txt.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
|| offset < 0
offset < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| offset > txt.length()
offset > txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
717 return
never executed: return QString();
QString();
never executed: return QString();
0
718-
719 if (offset == txt.length()
offset == txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
&& boundaryType == QAccessible::CharBoundary
boundaryType =...::CharBoundaryDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
720 return
never executed: return QString();
QString();
never executed: return QString();
0
721-
722-
723 QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;-
724 switch (boundaryType) {-
725 case
never executed: case QAccessible::CharBoundary:
QAccessible::CharBoundary:
never executed: case QAccessible::CharBoundary:
0
726 type = QTextBoundaryFinder::Grapheme;-
727 break;
never executed: break;
0
728 case
never executed: case QAccessible::WordBoundary:
QAccessible::WordBoundary:
never executed: case QAccessible::WordBoundary:
0
729 type = QTextBoundaryFinder::Word;-
730 break;
never executed: break;
0
731 case
never executed: case QAccessible::SentenceBoundary:
QAccessible::SentenceBoundary:
never executed: case QAccessible::SentenceBoundary:
0
732 type = QTextBoundaryFinder::Sentence;-
733 break;
never executed: break;
0
734 case
never executed: case QAccessible::LineBoundary:
QAccessible::LineBoundary:
never executed: case QAccessible::LineBoundary:
0
735 case
never executed: case QAccessible::ParagraphBoundary:
QAccessible::ParagraphBoundary:
never executed: case QAccessible::ParagraphBoundary:
0
736-
737 return
never executed: return textLineBoundary(0, txt, offset, startOffset, endOffset);
textLineBoundary(0, txt, offset, startOffset, endOffset);
never executed: return textLineBoundary(0, txt, offset, startOffset, endOffset);
0
738 case
never executed: case QAccessible::NoBoundary:
QAccessible::NoBoundary:
never executed: case QAccessible::NoBoundary:
0
739 *startOffset = 0;-
740 *endOffset = txt.length();-
741 return
never executed: return txt;
txt;
never executed: return txt;
0
742 default
never executed: default:
:
never executed: default:
0
743 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,2296) : qt_noop()); __builtin_unreachable(); } while (0);-
744 }
never executed: end of block
0
745-
746-
747-
748 QTextBoundaryFinder boundary(type, txt);-
749 boundary.setPosition(offset);-
750-
751 do {-
752 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
753 break;
never executed: break;
0
754 }
never executed: end of block
while (boundary.toPreviousBoundary() > 0
boundary.toPre...Boundary() > 0Description
TRUEnever evaluated
FALSEnever evaluated
);
0
755 ((!(boundary.position() >= 0)) ? qt_assert("boundary.position() >= 0",__FILE__,2308) : qt_noop());-
756 *startOffset = boundary.position();-
757-
758 while (boundary.toNextBoundary() < txt.length()
boundary.toNex...< txt.length()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
759 if ((
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
boundary.boundaryReasons() & (QTextBoundaryFinder::StartOfItem | QTextBoundaryFinder::EndOfItem))
(boundary.boun...r::EndOfItem))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
760 break;
never executed: break;
0
761 }
never executed: end of block
0
762 ((!(boundary.position() <= txt.length())) ? qt_assert("boundary.position() <= txt.length()",__FILE__,2315) : qt_noop());-
763 *endOffset = boundary.position();-
764-
765 return
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
txt.mid(*startOffset, *endOffset - *startOffset);
never executed: return txt.mid(*startOffset, *endOffset - *startOffset);
0
766}-
767QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()-
768{-
769-
770}-
771QAccessibleValueInterface::~QAccessibleValueInterface()-
772{-
773-
774}-
775QAccessibleImageInterface::~QAccessibleImageInterface()-
776{-
777-
778}-
779QAccessibleTableCellInterface::~QAccessibleTableCellInterface()-
780{-
781-
782}-
783QAccessibleTableInterface::~QAccessibleTableInterface()-
784{-
785-
786}-
787QAccessibleActionInterface::~QAccessibleActionInterface()-
788{-
789-
790}-
791struct QAccessibleActionStrings-
792{-
793 QAccessibleActionStrings() :-
794 pressAction(([]() -> QString { enum { Size = sizeof(u"" "Press")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Press" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
795 increaseAction(([]() -> QString { enum { Size = sizeof(u"" "Increase")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Increase" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
796 decreaseAction(([]() -> QString { enum { Size = sizeof(u"" "Decrease")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Decrease" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
797 showMenuAction(([]() -> QString { enum { Size = sizeof(u"" "ShowMenu")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ShowMenu" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
798 setFocusAction(([]() -> QString { enum { Size = sizeof(u"" "SetFocus")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "SetFocus" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
799 toggleAction(([]() -> QString { enum { Size = sizeof(u"" "Toggle")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Toggle" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
800 scrollLeftAction(([]() -> QString { enum { Size = sizeof(u"" "Scroll Left")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Scroll Left" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
801 scrollRightAction(([]() -> QString { enum { Size = sizeof(u"" "Scroll Right")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Scroll Right" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
802 scrollUpAction(([]() -> QString { enum { Size = sizeof(u"" "Scroll Up")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Scroll Up" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
803 scrollDownAction(([]() -> QString { enum { Size = sizeof(u"" "Scroll Down")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Scroll Down" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
804 previousPageAction(([]() -> QString { enum { Size = sizeof(u"" "Previous Page")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Previous Page" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())),-
805 nextPageAction(([]() -> QString { enum { Size = sizeof(u"" "Next Page")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Next Page" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()))-
806 {}
never executed: end of block
0
807-
808 const QString pressAction;-
809 const QString increaseAction;-
810 const QString decreaseAction;-
811 const QString showMenuAction;-
812 const QString setFocusAction;-
813 const QString toggleAction;-
814 const QString scrollLeftAction;-
815 const QString scrollRightAction;-
816 const QString scrollUpAction;-
817 const QString scrollDownAction;-
818 const QString previousPageAction;-
819 const QString nextPageAction;-
820-
821 QString localizedDescription(const QString &actionName)-
822 {-
823 if (actionName == pressAction
actionName == pressActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
824 return
never executed: return QAccessibleActionInterface::tr("Triggers the action");
QAccessibleActionInterface::tr("Triggers the action");
never executed: return QAccessibleActionInterface::tr("Triggers the action");
0
825 else if (actionName == increaseAction
actionName == increaseActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
826 return
never executed: return QAccessibleActionInterface::tr("Increase the value");
QAccessibleActionInterface::tr("Increase the value");
never executed: return QAccessibleActionInterface::tr("Increase the value");
0
827 else if (actionName == decreaseAction
actionName == decreaseActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
828 return
never executed: return QAccessibleActionInterface::tr("Decrease the value");
QAccessibleActionInterface::tr("Decrease the value");
never executed: return QAccessibleActionInterface::tr("Decrease the value");
0
829 else if (actionName == showMenuAction
actionName == showMenuActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
830 return
never executed: return QAccessibleActionInterface::tr("Shows the menu");
QAccessibleActionInterface::tr("Shows the menu");
never executed: return QAccessibleActionInterface::tr("Shows the menu");
0
831 else if (actionName == setFocusAction
actionName == setFocusActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
832 return
never executed: return QAccessibleActionInterface::tr("Sets the focus");
QAccessibleActionInterface::tr("Sets the focus");
never executed: return QAccessibleActionInterface::tr("Sets the focus");
0
833 else if (actionName == toggleAction
actionName == toggleActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
834 return
never executed: return QAccessibleActionInterface::tr("Toggles the state");
QAccessibleActionInterface::tr("Toggles the state");
never executed: return QAccessibleActionInterface::tr("Toggles the state");
0
835 else if (actionName == scrollLeftAction
actionName == scrollLeftActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
836 return
never executed: return QAccessibleActionInterface::tr("Scrolls to the left");
QAccessibleActionInterface::tr("Scrolls to the left");
never executed: return QAccessibleActionInterface::tr("Scrolls to the left");
0
837 else if (actionName == scrollRightAction
actionName == ...ollRightActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
838 return
never executed: return QAccessibleActionInterface::tr("Scrolls to the right");
QAccessibleActionInterface::tr("Scrolls to the right");
never executed: return QAccessibleActionInterface::tr("Scrolls to the right");
0
839 else if (actionName == scrollUpAction
actionName == scrollUpActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
840 return
never executed: return QAccessibleActionInterface::tr("Scrolls up");
QAccessibleActionInterface::tr("Scrolls up");
never executed: return QAccessibleActionInterface::tr("Scrolls up");
0
841 else if (actionName == scrollDownAction
actionName == scrollDownActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
842 return
never executed: return QAccessibleActionInterface::tr("Scrolls down");
QAccessibleActionInterface::tr("Scrolls down");
never executed: return QAccessibleActionInterface::tr("Scrolls down");
0
843 else if (actionName == previousPageAction
actionName == ...iousPageActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
844 return
never executed: return QAccessibleActionInterface::tr("Goes back a page");
QAccessibleActionInterface::tr("Goes back a page");
never executed: return QAccessibleActionInterface::tr("Goes back a page");
0
845 else if (actionName == nextPageAction
actionName == nextPageActionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
846 return
never executed: return QAccessibleActionInterface::tr("Goes to the next page");
QAccessibleActionInterface::tr("Goes to the next page");
never executed: return QAccessibleActionInterface::tr("Goes to the next page");
0
847-
848-
849 return
never executed: return QString();
QString();
never executed: return QString();
0
850 }-
851};-
852-
853namespace { namespace Q_QGS_accessibleActionStrings { typedef QAccessibleActionStrings Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QAccessibleActionStrings, Q_QGS_accessibleActionStrings::innerFunction, Q_QGS_accessibleActionStrings::guard> accessibleActionStrings;
0
854-
855QString QAccessibleActionInterface::localizedActionName(const QString &actionName) const-
856{-
857 return
never executed: return QAccessibleActionInterface::tr(QString(actionName).toLocal8Bit().constData());
QAccessibleActionInterface::tr(QString(actionName).toLocal8Bit().constData());
never executed: return QAccessibleActionInterface::tr(QString(actionName).toLocal8Bit().constData());
0
858}-
859-
860QString QAccessibleActionInterface::localizedActionDescription(const QString &actionName) const-
861{-
862 return
never executed: return accessibleActionStrings()->localizedDescription(actionName);
accessibleActionStrings()->localizedDescription(actionName);
never executed: return accessibleActionStrings()->localizedDescription(actionName);
0
863}-
864-
865-
866-
867-
868-
869const QString &QAccessibleActionInterface::pressAction()-
870{-
871 return
never executed: return accessibleActionStrings()->pressAction;
accessibleActionStrings()->pressAction;
never executed: return accessibleActionStrings()->pressAction;
0
872}-
873-
874-
875-
876-
877-
878const QString &QAccessibleActionInterface::increaseAction()-
879{-
880 return
never executed: return accessibleActionStrings()->increaseAction;
accessibleActionStrings()->increaseAction;
never executed: return accessibleActionStrings()->increaseAction;
0
881}-
882-
883-
884-
885-
886-
887const QString &QAccessibleActionInterface::decreaseAction()-
888{-
889 return
never executed: return accessibleActionStrings()->decreaseAction;
accessibleActionStrings()->decreaseAction;
never executed: return accessibleActionStrings()->decreaseAction;
0
890}-
891-
892-
893-
894-
895-
896const QString &QAccessibleActionInterface::showMenuAction()-
897{-
898 return
never executed: return accessibleActionStrings()->showMenuAction;
accessibleActionStrings()->showMenuAction;
never executed: return accessibleActionStrings()->showMenuAction;
0
899}-
900-
901-
902-
903-
904-
905const QString &QAccessibleActionInterface::setFocusAction()-
906{-
907 return
never executed: return accessibleActionStrings()->setFocusAction;
accessibleActionStrings()->setFocusAction;
never executed: return accessibleActionStrings()->setFocusAction;
0
908}-
909-
910-
911-
912-
913-
914const QString &QAccessibleActionInterface::toggleAction()-
915{-
916 return
never executed: return accessibleActionStrings()->toggleAction;
accessibleActionStrings()->toggleAction;
never executed: return accessibleActionStrings()->toggleAction;
0
917}-
918-
919-
920-
921-
922-
923QString QAccessibleActionInterface::scrollLeftAction()-
924{-
925 return
never executed: return accessibleActionStrings()->scrollLeftAction;
accessibleActionStrings()->scrollLeftAction;
never executed: return accessibleActionStrings()->scrollLeftAction;
0
926}-
927-
928-
929-
930-
931-
932QString QAccessibleActionInterface::scrollRightAction()-
933{-
934 return
never executed: return accessibleActionStrings()->scrollRightAction;
accessibleActionStrings()->scrollRightAction;
never executed: return accessibleActionStrings()->scrollRightAction;
0
935}-
936-
937-
938-
939-
940-
941QString QAccessibleActionInterface::scrollUpAction()-
942{-
943 return
never executed: return accessibleActionStrings()->scrollUpAction;
accessibleActionStrings()->scrollUpAction;
never executed: return accessibleActionStrings()->scrollUpAction;
0
944}-
945-
946-
947-
948-
949-
950QString QAccessibleActionInterface::scrollDownAction()-
951{-
952 return
never executed: return accessibleActionStrings()->scrollDownAction;
accessibleActionStrings()->scrollDownAction;
never executed: return accessibleActionStrings()->scrollDownAction;
0
953}-
954-
955-
956-
957-
958-
959QString QAccessibleActionInterface::previousPageAction()-
960{-
961 return
never executed: return accessibleActionStrings()->previousPageAction;
accessibleActionStrings()->previousPageAction;
never executed: return accessibleActionStrings()->previousPageAction;
0
962}-
963-
964-
965-
966-
967-
968QString QAccessibleActionInterface::nextPageAction()-
969{-
970 return
never executed: return accessibleActionStrings()->nextPageAction;
accessibleActionStrings()->nextPageAction;
never executed: return accessibleActionStrings()->nextPageAction;
0
971}-
972-
973-
974QString qAccessibleLocalizedActionDescription(const QString &actionName)-
975{-
976 return
never executed: return accessibleActionStrings()->localizedDescription(actionName);
accessibleActionStrings()->localizedDescription(actionName);
never executed: return accessibleActionStrings()->localizedDescription(actionName);
0
977}-
978-
979-
980-
981-
Switch to Source codePreprocessed file

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