OpenCoverage

qaccessiblequickview.cpp

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

Generated by Squish Coco 4.2.0