| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickaccessibleattached.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | QMetaMethod QQuickAccessibleAttached::sigPress; | - | ||||||||||||
| 7 | QMetaMethod QQuickAccessibleAttached::sigToggle; | - | ||||||||||||
| 8 | QMetaMethod QQuickAccessibleAttached::sigIncrease; | - | ||||||||||||
| 9 | QMetaMethod QQuickAccessibleAttached::sigDecrease; | - | ||||||||||||
| 10 | QMetaMethod QQuickAccessibleAttached::sigScrollUp; | - | ||||||||||||
| 11 | QMetaMethod QQuickAccessibleAttached::sigScrollDown; | - | ||||||||||||
| 12 | QMetaMethod QQuickAccessibleAttached::sigScrollLeft; | - | ||||||||||||
| 13 | QMetaMethod QQuickAccessibleAttached::sigScrollRight; | - | ||||||||||||
| 14 | QMetaMethod QQuickAccessibleAttached::sigPreviousPage; | - | ||||||||||||
| 15 | QMetaMethod QQuickAccessibleAttached::sigNextPage; | - | ||||||||||||
| 16 | - | |||||||||||||
| 17 | QQuickAccessibleAttached::QQuickAccessibleAttached(QObject *parent) | - | ||||||||||||
| 18 | : QObject(parent), m_role(QAccessible::NoRole) | - | ||||||||||||
| 19 | { | - | ||||||||||||
| 20 | ((parent) ? static_cast<void>(0) : qt_assert("parent", __FILE__, 357)); | - | ||||||||||||
| 21 | QQuickItem *item = qobject_cast<QQuickItem*>(parent); | - | ||||||||||||
| 22 | if (!item
| 2-84 | ||||||||||||
| 23 | return; executed 2 times by 1 test: return;Executed by:
| 2 | ||||||||||||
| 24 | - | |||||||||||||
| 25 | - | |||||||||||||
| 26 | - | |||||||||||||
| 27 | item->d_func()->setAccessible(); | - | ||||||||||||
| 28 | QAccessibleEvent ev(item, QAccessible::ObjectCreated); | - | ||||||||||||
| 29 | QAccessible::updateAccessibility(&ev); | - | ||||||||||||
| 30 | - | |||||||||||||
| 31 | if (!parent->property("value").isNull()
| 0-84 | ||||||||||||
| 32 | connect(parent, qFlagLocation("2""valueChanged()" "\0" __FILE__ ":" "369"), this, qFlagLocation("1""valueChanged()" "\0" __FILE__ ":" "369")); | - | ||||||||||||
| 33 | } never executed: end of block | 0 | ||||||||||||
| 34 | if (!parent->property("cursorPosition").isNull()
| 0-84 | ||||||||||||
| 35 | connect(parent, qFlagLocation("2""cursorPositionChanged()" "\0" __FILE__ ":" "372"), this, qFlagLocation("1""cursorPositionChanged()" "\0" __FILE__ ":" "372")); | - | ||||||||||||
| 36 | } never executed: end of block | 0 | ||||||||||||
| 37 | - | |||||||||||||
| 38 | if (!sigPress.isValid()
| 4-80 | ||||||||||||
| 39 | sigPress = QMetaMethod::fromSignal(&QQuickAccessibleAttached::pressAction); | - | ||||||||||||
| 40 | sigToggle = QMetaMethod::fromSignal(&QQuickAccessibleAttached::toggleAction); | - | ||||||||||||
| 41 | sigIncrease = QMetaMethod::fromSignal(&QQuickAccessibleAttached::increaseAction); | - | ||||||||||||
| 42 | sigDecrease = QMetaMethod::fromSignal(&QQuickAccessibleAttached::decreaseAction); | - | ||||||||||||
| 43 | sigScrollUp = QMetaMethod::fromSignal(&QQuickAccessibleAttached::scrollUpAction); | - | ||||||||||||
| 44 | sigScrollDown = QMetaMethod::fromSignal(&QQuickAccessibleAttached::scrollDownAction); | - | ||||||||||||
| 45 | sigScrollLeft = QMetaMethod::fromSignal(&QQuickAccessibleAttached::scrollLeftAction); | - | ||||||||||||
| 46 | sigScrollRight = QMetaMethod::fromSignal(&QQuickAccessibleAttached::scrollRightAction); | - | ||||||||||||
| 47 | sigPreviousPage = QMetaMethod::fromSignal(&QQuickAccessibleAttached::previousPageAction); | - | ||||||||||||
| 48 | sigNextPage= QMetaMethod::fromSignal(&QQuickAccessibleAttached::nextPageAction); | - | ||||||||||||
| 49 | } executed 4 times by 2 tests: end of blockExecuted by:
| 4 | ||||||||||||
| 50 | } executed 84 times by 2 tests: end of blockExecuted by:
| 84 | ||||||||||||
| 51 | - | |||||||||||||
| 52 | QQuickAccessibleAttached::~QQuickAccessibleAttached() | - | ||||||||||||
| 53 | { | - | ||||||||||||
| 54 | } | - | ||||||||||||
| 55 | - | |||||||||||||
| 56 | QQuickAccessibleAttached *QQuickAccessibleAttached::qmlAttachedProperties(QObject *obj) | - | ||||||||||||
| 57 | { | - | ||||||||||||
| 58 | return executed 84 times by 2 tests: new QQuickAccessibleAttached(obj);return new QQuickAccessibleAttached(obj);Executed by:
executed 84 times by 2 tests: return new QQuickAccessibleAttached(obj);Executed by:
| 84 | ||||||||||||
| 59 | } | - | ||||||||||||
| 60 | - | |||||||||||||
| 61 | bool QQuickAccessibleAttached::ignored() const | - | ||||||||||||
| 62 | { | - | ||||||||||||
| 63 | return executed 4 times by 1 test: !item()->d_func()->isAccessible;return !item()->d_func()->isAccessible;Executed by:
executed 4 times by 1 test: return !item()->d_func()->isAccessible;Executed by:
| 4 | ||||||||||||
| 64 | } | - | ||||||||||||
| 65 | - | |||||||||||||
| 66 | void QQuickAccessibleAttached::setIgnored(bool ignored) | - | ||||||||||||
| 67 | { | - | ||||||||||||
| 68 | if (this->ignored() != ignored
| 0-4 | ||||||||||||
| 69 | item()->d_func()->isAccessible = !ignored; | - | ||||||||||||
| 70 | ignoredChanged(); | - | ||||||||||||
| 71 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||
| 72 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||
| 73 | - | |||||||||||||
| 74 | bool QQuickAccessibleAttached::doAction(const QString &actionName) | - | ||||||||||||
| 75 | { | - | ||||||||||||
| 76 | QMetaMethod *sig = nullptr; | - | ||||||||||||
| 77 | if (actionName == QAccessibleActionInterface::pressAction()
| 0 | ||||||||||||
| 78 | sig = &sigPress; never executed: sig = &sigPress; | 0 | ||||||||||||
| 79 | else if (actionName == QAccessibleActionInterface::toggleAction()
| 0 | ||||||||||||
| 80 | sig = &sigToggle; never executed: sig = &sigToggle; | 0 | ||||||||||||
| 81 | else if (actionName == QAccessibleActionInterface::increaseAction()
| 0 | ||||||||||||
| 82 | sig = &sigIncrease; never executed: sig = &sigIncrease; | 0 | ||||||||||||
| 83 | else if (actionName == QAccessibleActionInterface::decreaseAction()
| 0 | ||||||||||||
| 84 | sig = &sigDecrease; never executed: sig = &sigDecrease; | 0 | ||||||||||||
| 85 | else if (actionName == QAccessibleActionInterface::scrollUpAction()
| 0 | ||||||||||||
| 86 | sig = &sigScrollUp; never executed: sig = &sigScrollUp; | 0 | ||||||||||||
| 87 | else if (actionName == QAccessibleActionInterface::scrollDownAction()
| 0 | ||||||||||||
| 88 | sig = &sigScrollDown; never executed: sig = &sigScrollDown; | 0 | ||||||||||||
| 89 | else if (actionName == QAccessibleActionInterface::scrollLeftAction()
| 0 | ||||||||||||
| 90 | sig = &sigScrollLeft; never executed: sig = &sigScrollLeft; | 0 | ||||||||||||
| 91 | else if (actionName == QAccessibleActionInterface::scrollRightAction()
| 0 | ||||||||||||
| 92 | sig = &sigScrollRight; never executed: sig = &sigScrollRight; | 0 | ||||||||||||
| 93 | else if (actionName == QAccessibleActionInterface::previousPageAction()
| 0 | ||||||||||||
| 94 | sig = &sigPreviousPage; never executed: sig = &sigPreviousPage; | 0 | ||||||||||||
| 95 | else if (actionName == QAccessibleActionInterface::nextPageAction()
| 0 | ||||||||||||
| 96 | sig = &sigNextPage; never executed: sig = &sigNextPage; | 0 | ||||||||||||
| 97 | if (sig
| 0 | ||||||||||||
| 98 | return never executed: sig->invoke(this);return sig->invoke(this);never executed: return sig->invoke(this); | 0 | ||||||||||||
| 99 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 100 | } | - | ||||||||||||
| 101 | - | |||||||||||||
| 102 | void QQuickAccessibleAttached::availableActions(QStringList *actions) const | - | ||||||||||||
| 103 | { | - | ||||||||||||
| 104 | if (isSignalConnected(sigPress)
| 0 | ||||||||||||
| 105 | actions->append(QAccessibleActionInterface::pressAction()); never executed: actions->append(QAccessibleActionInterface::pressAction()); | 0 | ||||||||||||
| 106 | if (isSignalConnected(sigToggle)
| 0 | ||||||||||||
| 107 | actions->append(QAccessibleActionInterface::toggleAction()); never executed: actions->append(QAccessibleActionInterface::toggleAction()); | 0 | ||||||||||||
| 108 | if (isSignalConnected(sigIncrease)
| 0 | ||||||||||||
| 109 | actions->append(QAccessibleActionInterface::increaseAction()); never executed: actions->append(QAccessibleActionInterface::increaseAction()); | 0 | ||||||||||||
| 110 | if (isSignalConnected(sigDecrease)
| 0 | ||||||||||||
| 111 | actions->append(QAccessibleActionInterface::decreaseAction()); never executed: actions->append(QAccessibleActionInterface::decreaseAction()); | 0 | ||||||||||||
| 112 | if (isSignalConnected(sigScrollUp)
| 0 | ||||||||||||
| 113 | actions->append(QAccessibleActionInterface::scrollUpAction()); never executed: actions->append(QAccessibleActionInterface::scrollUpAction()); | 0 | ||||||||||||
| 114 | if (isSignalConnected(sigScrollDown)
| 0 | ||||||||||||
| 115 | actions->append(QAccessibleActionInterface::scrollDownAction()); never executed: actions->append(QAccessibleActionInterface::scrollDownAction()); | 0 | ||||||||||||
| 116 | if (isSignalConnected(sigScrollLeft)
| 0 | ||||||||||||
| 117 | actions->append(QAccessibleActionInterface::scrollLeftAction()); never executed: actions->append(QAccessibleActionInterface::scrollLeftAction()); | 0 | ||||||||||||
| 118 | if (isSignalConnected(sigScrollRight)
| 0 | ||||||||||||
| 119 | actions->append(QAccessibleActionInterface::scrollRightAction()); never executed: actions->append(QAccessibleActionInterface::scrollRightAction()); | 0 | ||||||||||||
| 120 | if (isSignalConnected(sigPreviousPage)
| 0 | ||||||||||||
| 121 | actions->append(QAccessibleActionInterface::previousPageAction()); never executed: actions->append(QAccessibleActionInterface::previousPageAction()); | 0 | ||||||||||||
| 122 | if (isSignalConnected(sigNextPage)
| 0 | ||||||||||||
| 123 | actions->append(QAccessibleActionInterface::nextPageAction()); never executed: actions->append(QAccessibleActionInterface::nextPageAction()); | 0 | ||||||||||||
| 124 | } never executed: end of block | 0 | ||||||||||||
| 125 | - | |||||||||||||
| 126 | - | |||||||||||||
| 127 | - | |||||||||||||
| Switch to Source code | Preprocessed file |