| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/accessible/qaccessiblequickview.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | - | |||||||||||||
| 9 | QAccessibleQuickWindow::QAccessibleQuickWindow(QQuickWindow *object) | - | ||||||||||||
| 10 | :QAccessibleObject(object) | - | ||||||||||||
| 11 | { | - | ||||||||||||
| 12 | } executed 1052 times by 18 tests: end of blockExecuted by:
| 1052 | ||||||||||||
| 13 | - | |||||||||||||
| 14 | QList<QQuickItem *> QAccessibleQuickWindow::rootItems() const | - | ||||||||||||
| 15 | { | - | ||||||||||||
| 16 | if (QQuickItem *ci = window()->contentItem()
| 0-22 | ||||||||||||
| 17 | return executed 22 times by 1 test: accessibleUnignoredChildren(ci);return accessibleUnignoredChildren(ci);Executed by:
executed 22 times by 1 test: return accessibleUnignoredChildren(ci);Executed by:
| 22 | ||||||||||||
| 18 | return never executed: QList<QQuickItem *>();return QList<QQuickItem *>();never executed: return QList<QQuickItem *>(); | 0 | ||||||||||||
| 19 | } | - | ||||||||||||
| 20 | - | |||||||||||||
| 21 | int QAccessibleQuickWindow::childCount() const | - | ||||||||||||
| 22 | { | - | ||||||||||||
| 23 | return executed 6 times by 1 test: rootItems().count();return rootItems().count();Executed by:
executed 6 times by 1 test: return rootItems().count();Executed by:
| 6 | ||||||||||||
| 24 | } | - | ||||||||||||
| 25 | - | |||||||||||||
| 26 | QAccessibleInterface *QAccessibleQuickWindow::parent() const | - | ||||||||||||
| 27 | { | - | ||||||||||||
| 28 | - | |||||||||||||
| 29 | return never executed: QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));return QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance())));never executed: return QAccessible::queryAccessibleInterface((static_cast<QGuiApplication *>(QCoreApplication::instance()))); | 0 | ||||||||||||
| 30 | } | - | ||||||||||||
| 31 | - | |||||||||||||
| 32 | QAccessibleInterface *QAccessibleQuickWindow::child(int index) const | - | ||||||||||||
| 33 | { | - | ||||||||||||
| 34 | const QList<QQuickItem*> &kids = rootItems(); | - | ||||||||||||
| 35 | if (index >= 0
| 0-12 | ||||||||||||
| 36 | return executed 12 times by 1 test: QAccessible::queryAccessibleInterface(kids.at(index));return QAccessible::queryAccessibleInterface(kids.at(index));Executed by:
executed 12 times by 1 test: return QAccessible::queryAccessibleInterface(kids.at(index));Executed by:
| 12 | ||||||||||||
| 37 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||||||||
| 38 | } | - | ||||||||||||
| 39 | - | |||||||||||||
| 40 | QAccessibleInterface *QAccessibleQuickWindow::focusChild() const | - | ||||||||||||
| 41 | { | - | ||||||||||||
| 42 | QObject *focusObject = window()->focusObject(); | - | ||||||||||||
| 43 | if (focusObject
| 0 | ||||||||||||
| 44 | return never executed: QAccessible::queryAccessibleInterface(focusObject);return QAccessible::queryAccessibleInterface(focusObject);never executed: return QAccessible::queryAccessibleInterface(focusObject); | 0 | ||||||||||||
| 45 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||||||||
| 46 | } | - | ||||||||||||
| 47 | - | |||||||||||||
| 48 | QAccessible::Role QAccessibleQuickWindow::role() const | - | ||||||||||||
| 49 | { | - | ||||||||||||
| 50 | return never executed: QAccessible::Window;return QAccessible::Window;never executed: return QAccessible::Window; | 0 | ||||||||||||
| 51 | } | - | ||||||||||||
| 52 | - | |||||||||||||
| 53 | QAccessible::State QAccessibleQuickWindow::state() const | - | ||||||||||||
| 54 | { | - | ||||||||||||
| 55 | QAccessible::State st; | - | ||||||||||||
| 56 | if (window() == QGuiApplication::focusWindow()
| 0 | ||||||||||||
| 57 | st.active = true; never executed: st.active = true; | 0 | ||||||||||||
| 58 | if (!window()->isVisible()
| 0 | ||||||||||||
| 59 | st.invisible = true; never executed: st.invisible = true; | 0 | ||||||||||||
| 60 | return never executed: st;return st;never executed: return st; | 0 | ||||||||||||
| 61 | } | - | ||||||||||||
| 62 | - | |||||||||||||
| 63 | QRect QAccessibleQuickWindow::rect() const | - | ||||||||||||
| 64 | { | - | ||||||||||||
| 65 | return executed 6 times by 1 test: QRect(window()->x(), window()->y(), window()->width(), window()->height());return QRect(window()->x(), window()->y(), window()->width(), window()->height());Executed by:
executed 6 times by 1 test: return QRect(window()->x(), window()->y(), window()->width(), window()->height());Executed by:
| 6 | ||||||||||||
| 66 | } | - | ||||||||||||
| 67 | - | |||||||||||||
| 68 | QString QAccessibleQuickWindow::text(QAccessible::Text text) const | - | ||||||||||||
| 69 | { | - | ||||||||||||
| 70 | - | |||||||||||||
| 71 | - | |||||||||||||
| 72 | - | |||||||||||||
| 73 | - | |||||||||||||
| 74 | - | |||||||||||||
| 75 | (void)text; | - | ||||||||||||
| 76 | - | |||||||||||||
| 77 | return never executed: window()->title();return window()->title();never executed: return window()->title(); | 0 | ||||||||||||
| 78 | } | - | ||||||||||||
| 79 | - | |||||||||||||
| 80 | QAccessibleInterface *QAccessibleQuickWindow::childAt(int x, int y) const | - | ||||||||||||
| 81 | { | - | ||||||||||||
| 82 | ((window()) ? static_cast<void>(0) : qt_assert("window()", __FILE__, 126)); | - | ||||||||||||
| 83 | for (int i = childCount() - 1; i >= 0
| 0-4 | ||||||||||||
| 84 | QAccessibleInterface *childIface = child(i); | - | ||||||||||||
| 85 | if (childIface
| 0-4 | ||||||||||||
| 86 | if (QAccessibleInterface *iface = childIface->childAt(x, y)
| 0-4 | ||||||||||||
| 87 | return executed 4 times by 1 test: iface;return iface;Executed by:
executed 4 times by 1 test: return iface;Executed by:
| 4 | ||||||||||||
| 88 | if (childIface->rect().contains(x, y)
| 0 | ||||||||||||
| 89 | return never executed: childIface;return childIface;never executed: return childIface; | 0 | ||||||||||||
| 90 | } never executed: end of block | 0 | ||||||||||||
| 91 | } never executed: end of block | 0 | ||||||||||||
| 92 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||||||||
| 93 | } | - | ||||||||||||
| 94 | - | |||||||||||||
| 95 | int QAccessibleQuickWindow::indexOfChild(const QAccessibleInterface *iface) const | - | ||||||||||||
| 96 | { | - | ||||||||||||
| 97 | int i = -1; | - | ||||||||||||
| 98 | if (iface
| 0-4 | ||||||||||||
| 99 | const QList<QQuickItem *> &roots = rootItems(); | - | ||||||||||||
| 100 | i = roots.count() - 1; | - | ||||||||||||
| 101 | while (i >= 0
| 2-4 | ||||||||||||
| 102 | if (iface->object() == roots.at(i)
| 2 | ||||||||||||
| 103 | break; executed 2 times by 1 test: break;Executed by:
| 2 | ||||||||||||
| 104 | --i; | - | ||||||||||||
| 105 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||
| 106 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||
| 107 | return executed 4 times by 1 test: i;return i;Executed by:
executed 4 times by 1 test: return i;Executed by:
| 4 | ||||||||||||
| 108 | } | - | ||||||||||||
| 109 | - | |||||||||||||
| 110 | - | |||||||||||||
| Switch to Source code | Preprocessed file |