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