OpenCoverage

qquickaccessibleattached_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickaccessibleattached_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class __attribute__((visibility("default"))) QQuickAccessibleAttached : public QObject-
8{-
9 public:-
10#pragma GCC diagnostic push-
11 -
12#pragma GCC diagnostic ignored "-Wsuggest-override"-
13 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
14#pragma GCC diagnostic ignored "-Wattributes"-
15 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
16#pragma GCC diagnostic pop-
17 struct QPrivateSignal {};-
18 -
19 -
20 -
21 -
22-
23public:-
24 -
25 bool checkable() const { return
never executed: return m_state.checkable ;
m_state.checkable ;
never executed: return m_state.checkable ;
} void set_checkable(bool arg) { if (m_state.checkable == arg
m_state.checkable == argDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickaccessible
) return;
never executed: return;
m_state.checkable = arg; checkableChanged(arg); QAccessible::State changedState; changedState.checkable = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
void checkableChanged(bool arg);
0-4
26 bool checked() const { return
never executed: return m_state.checked ;
m_state.checked ;
never executed: return m_state.checked ;
} void set_checked(bool arg) { if (m_state.checked == arg
m_state.checked == argDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickaccessible
) return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickaccessible
m_state.checked = arg; checkedChanged(arg); QAccessible::State changedState; changedState.checked = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
void checkedChanged(bool arg);
0-8
27 bool editable() const { return
never executed: return m_state.editable ;
m_state.editable ;
never executed: return m_state.editable ;
} void set_editable(bool arg) { if (m_state.editable == arg
m_state.editable == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.editable = arg; editableChanged(arg); QAccessible::State changedState; changedState.editable = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void editableChanged(bool arg);
0
28 bool focusable() const { return
never executed: return m_state.focusable ;
m_state.focusable ;
never executed: return m_state.focusable ;
} void set_focusable(bool arg) { if (m_state.focusable == arg
m_state.focusable == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.focusable = arg; focusableChanged(arg); QAccessible::State changedState; changedState.focusable = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void focusableChanged(bool arg);
0
29 bool focused() const { return
never executed: return m_state.focused ;
m_state.focused ;
never executed: return m_state.focused ;
} void set_focused(bool arg) { if (m_state.focused == arg
m_state.focused == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.focused = arg; focusedChanged(arg); QAccessible::State changedState; changedState.focused = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void focusedChanged(bool arg);
0
30 bool multiLine() const { return
never executed: return m_state.multiLine ;
m_state.multiLine ;
never executed: return m_state.multiLine ;
} void set_multiLine(bool arg) { if (m_state.multiLine == arg
m_state.multiLine == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.multiLine = arg; multiLineChanged(arg); QAccessible::State changedState; changedState.multiLine = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void multiLineChanged(bool arg);
0
31 bool readOnly() const { return
never executed: return m_state.readOnly ;
m_state.readOnly ;
never executed: return m_state.readOnly ;
} void set_readOnly(bool arg) { if (m_state.readOnly == arg
m_state.readOnly == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.readOnly = arg; readOnlyChanged(arg); QAccessible::State changedState; changedState.readOnly = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void readOnlyChanged(bool arg);
0
32 bool selected() const { return
never executed: return m_state.selected ;
m_state.selected ;
never executed: return m_state.selected ;
} void set_selected(bool arg) { if (m_state.selected == arg
m_state.selected == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.selected = arg; selectedChanged(arg); QAccessible::State changedState; changedState.selected = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void selectedChanged(bool arg);
0
33 bool selectable() const { return
never executed: return m_state.selectable ;
m_state.selectable ;
never executed: return m_state.selectable ;
} void set_selectable(bool arg) { if (m_state.selectable == arg
m_state.selectable == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.selectable = arg; selectableChanged(arg); QAccessible::State changedState; changedState.selectable = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void selectableChanged(bool arg);
0
34 bool pressed() const { return
never executed: return m_state.pressed ;
m_state.pressed ;
never executed: return m_state.pressed ;
} void set_pressed(bool arg) { if (m_state.pressed == arg
m_state.pressed == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.pressed = arg; pressedChanged(arg); QAccessible::State changedState; changedState.pressed = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void pressedChanged(bool arg);
0
35 bool checkStateMixed() const { return
never executed: return m_state.checkStateMixed ;
m_state.checkStateMixed ;
never executed: return m_state.checkStateMixed ;
} void set_checkStateMixed(bool arg) { if (m_state.checkStateMixed == arg
m_state.checkStateMixed == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.checkStateMixed = arg; checkStateMixedChanged(arg); QAccessible::State changedState; changedState.checkStateMixed = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void checkStateMixedChanged(bool arg);
0
36 bool defaultButton() const { return
never executed: return m_state.defaultButton ;
m_state.defaultButton ;
never executed: return m_state.defaultButton ;
} void set_defaultButton(bool arg) { if (m_state.defaultButton == arg
m_state.defaultButton == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.defaultButton = arg; defaultButtonChanged(arg); QAccessible::State changedState; changedState.defaultButton = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void defaultButtonChanged(bool arg);
0
37 bool passwordEdit() const { return
never executed: return m_state.passwordEdit ;
m_state.passwordEdit ;
never executed: return m_state.passwordEdit ;
} void set_passwordEdit(bool arg) { if (m_state.passwordEdit == arg
m_state.passwordEdit == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.passwordEdit = arg; passwordEditChanged(arg); QAccessible::State changedState; changedState.passwordEdit = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void passwordEditChanged(bool arg);
0
38 bool selectableText() const { return
never executed: return m_state.selectableText ;
m_state.selectableText ;
never executed: return m_state.selectableText ;
} void set_selectableText(bool arg) { if (m_state.selectableText == arg
m_state.selectableText == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.selectableText = arg; selectableTextChanged(arg); QAccessible::State changedState; changedState.selectableText = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void selectableTextChanged(bool arg);
0
39 bool searchEdit() const { return
never executed: return m_state.searchEdit ;
m_state.searchEdit ;
never executed: return m_state.searchEdit ;
} void set_searchEdit(bool arg) { if (m_state.searchEdit == arg
m_state.searchEdit == argDescription
TRUEnever evaluated
FALSEnever evaluated
) return;
never executed: return;
m_state.searchEdit = arg; searchEditChanged(arg); QAccessible::State changedState; changedState.searchEdit = true; QAccessibleStateChangeEvent ev(parent(), changedState); QAccessible::updateAccessibility(&ev); }
never executed: end of block
void searchEditChanged(bool arg);
0
40-
41 QQuickAccessibleAttached(QObject *parent);-
42 ~QQuickAccessibleAttached();-
43-
44 QAccessible::Role role() const { return
executed 240 times by 1 test: return m_role;
Executed by:
  • tst_qquickaccessible
m_role;
executed 240 times by 1 test: return m_role;
Executed by:
  • tst_qquickaccessible
}
240
45 void setRole(QAccessible::Role role)-
46 {-
47 if (role != m_role
role != m_roleDescription
TRUEevaluated 78 times by 2 tests
Evaluated by:
  • tst_qquickaccessible
  • tst_qquickitem2
FALSEnever evaluated
) {
0-78
48 m_role = role;-
49 roleChanged();-
50-
51-
52-
53 switch (role) {-
54 case
executed 4 times by 1 test: case QAccessible::CheckBox:
Executed by:
  • tst_qquickaccessible
QAccessible::CheckBox:
executed 4 times by 1 test: case QAccessible::CheckBox:
Executed by:
  • tst_qquickaccessible
4
55 case
never executed: case QAccessible::RadioButton:
QAccessible::RadioButton:
never executed: case QAccessible::RadioButton:
0
56 m_state.focusable = true;-
57 m_state.checkable = true;-
58 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickaccessible
4
59 case
executed 12 times by 1 test: case QAccessible::Button:
Executed by:
  • tst_qquickaccessible
QAccessible::Button:
executed 12 times by 1 test: case QAccessible::Button:
Executed by:
  • tst_qquickaccessible
12
60 case
never executed: case QAccessible::MenuItem:
QAccessible::MenuItem:
never executed: case QAccessible::MenuItem:
0
61 case
never executed: case QAccessible::PageTab:
QAccessible::PageTab:
never executed: case QAccessible::PageTab:
0
62 case
never executed: case QAccessible::EditableText:
QAccessible::EditableText:
never executed: case QAccessible::EditableText:
0
63 case
never executed: case QAccessible::SpinBox:
QAccessible::SpinBox:
never executed: case QAccessible::SpinBox:
0
64 case
never executed: case QAccessible::ComboBox:
QAccessible::ComboBox:
never executed: case QAccessible::ComboBox:
0
65 case
never executed: case QAccessible::Terminal:
QAccessible::Terminal:
never executed: case QAccessible::Terminal:
0
66 case
never executed: case QAccessible::ScrollBar:
QAccessible::ScrollBar:
never executed: case QAccessible::ScrollBar:
0
67 m_state.focusable = true;-
68 break;
executed 12 times by 1 test: break;
Executed by:
  • tst_qquickaccessible
12
69 default
executed 62 times by 2 tests: default:
Executed by:
  • tst_qquickaccessible
  • tst_qquickitem2
:
executed 62 times by 2 tests: default:
Executed by:
  • tst_qquickaccessible
  • tst_qquickitem2
62
70 break;
executed 62 times by 2 tests: break;
Executed by:
  • tst_qquickaccessible
  • tst_qquickitem2
62
71 }-
72 }-
73 }
executed 78 times by 2 tests: end of block
Executed by:
  • tst_qquickaccessible
  • tst_qquickitem2
78
74 QString name() const {-
75 if (m_state.passwordEdit
m_state.passwordEditDescription
TRUEnever evaluated
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_qquickaccessible
)
0-60
76 return
never executed: return QString();
QString();
never executed: return QString();
0
77 return
executed 60 times by 1 test: return m_name;
Executed by:
  • tst_qquickaccessible
m_name;
executed 60 times by 1 test: return m_name;
Executed by:
  • tst_qquickaccessible
60
78 }-
79 void setName(const QString &name) {-
80 if (name != m_name
name != m_nameDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEnever evaluated
) {
0-66
81 m_name = name;-
82 nameChanged();-
83 QAccessibleEvent ev(parent(), QAccessible::NameChanged);-
84 QAccessible::updateAccessibility(&ev);-
85 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
66
86 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
66
87-
88 QString description() const { return
executed 4 times by 1 test: return m_description;
Executed by:
  • tst_qquickaccessible
m_description;
executed 4 times by 1 test: return m_description;
Executed by:
  • tst_qquickaccessible
}
4
89 void setDescription(const QString &description)-
90 {-
91 if (m_description != description
m_description != descriptionDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEnever evaluated
) {
0-36
92 m_description = description;-
93 descriptionChanged();-
94 QAccessibleEvent ev(parent(), QAccessible::DescriptionChanged);-
95 QAccessible::updateAccessibility(&ev);-
96 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
36
97 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
36
98-
99-
100 static QQuickAccessibleAttached *qmlAttachedProperties(QObject *obj);-
101-
102 static QQuickAccessibleAttached *attachedProperties(const QObject *obj)-
103 {-
104 return
executed 126 times by 1 test: return qobject_cast<QQuickAccessibleAttached*>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(obj, false));
Executed by:
  • tst_qquickaccessible
qobject_cast<QQuickAccessibleAttached*>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(obj, false));
executed 126 times by 1 test: return qobject_cast<QQuickAccessibleAttached*>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(obj, false));
Executed by:
  • tst_qquickaccessible
126
105 }-
106-
107-
108 static QVariant property(const QObject *object, const char *propertyName)-
109 {-
110 if (QObject *attachedObject = QQuickAccessibleAttached::attachedProperties(object)
QObject *attac...erties(object)Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEnever evaluated
)
0-34
111 return
executed 34 times by 1 test: return attachedObject->property(propertyName);
Executed by:
  • tst_qquickaccessible
attachedObject->property(propertyName);
executed 34 times by 1 test: return attachedObject->property(propertyName);
Executed by:
  • tst_qquickaccessible
34
112 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
113 }-
114-
115 static bool setProperty(QObject *object, const char *propertyName, const QVariant &value)-
116 {-
117 QObject *obj = qmlAttachedPropertiesObject<QQuickAccessibleAttached>(object, true);-
118 if (!obj
!objDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
119 QMessageLogger(__FILE__, 188, __PRETTY_FUNCTION__).warning("cannot set property Accessible.%s of QObject %s", propertyName, object->metaObject()->className());-
120 return
never executed: return false;
false;
never executed: return false;
0
121 }-
122 return
never executed: return obj->setProperty(propertyName, value);
obj->setProperty(propertyName, value);
never executed: return obj->setProperty(propertyName, value);
0
123 }-
124-
125 static QObject *findAccessible(QObject *object, QAccessible::Role role = QAccessible::NoRole)-
126 {-
127 while (object
objectDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickaccessible
) {
2-6
128 QQuickAccessibleAttached *att = QQuickAccessibleAttached::attachedProperties(object);-
129 if (att
attDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickaccessible
&& (role == QAccessible::NoRole
role == QAccessible::NoRoleDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickaccessible
FALSEnever evaluated
|| att->role() == role
att->role() == roleDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0-4
130 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickaccessible
2
131 }-
132 object = object->parent();-
133 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickaccessible
4
134 return
executed 4 times by 1 test: return object;
Executed by:
  • tst_qquickaccessible
object;
executed 4 times by 1 test: return object;
Executed by:
  • tst_qquickaccessible
4
135 }-
136-
137 QAccessible::State state() const { return
executed 80 times by 1 test: return m_state;
Executed by:
  • tst_qquickaccessible
m_state;
executed 80 times by 1 test: return m_state;
Executed by:
  • tst_qquickaccessible
}
80
138 bool ignored() const;-
139 bool doAction(const QString &actionName);-
140 void availableActions(QStringList *actions) const;-
141-
142public :-
143 void valueChanged() {-
144 QAccessibleValueChangeEvent ev(parent(), parent()->property("value"));-
145 QAccessible::updateAccessibility(&ev);-
146 }
never executed: end of block
0
147 void cursorPositionChanged() {-
148 QAccessibleTextCursorEvent ev(parent(), parent()->property("cursorPosition").toInt());-
149 QAccessible::updateAccessibility(&ev);-
150 }
never executed: end of block
0
151-
152 void setIgnored(bool ignored);-
153-
154public :-
155 void roleChanged();-
156 void nameChanged();-
157 void descriptionChanged();-
158 void ignoredChanged();-
159 void pressAction();-
160 void toggleAction();-
161 void increaseAction();-
162 void decreaseAction();-
163 void scrollUpAction();-
164 void scrollDownAction();-
165 void scrollLeftAction();-
166 void scrollRightAction();-
167 void previousPageAction();-
168 void nextPageAction();-
169-
170private:-
171 QQuickItem *item() const { return
executed 8 times by 1 test: return static_cast<QQuickItem*>(parent());
Executed by:
  • tst_qquickaccessible
static_cast<QQuickItem*>(parent());
executed 8 times by 1 test: return static_cast<QQuickItem*>(parent());
Executed by:
  • tst_qquickaccessible
}
8
172-
173 QAccessible::Role m_role;-
174 QAccessible::State m_state;-
175 QString m_name;-
176 QString m_description;-
177-
178 static QMetaMethod sigPress;-
179 static QMetaMethod sigToggle;-
180 static QMetaMethod sigIncrease;-
181 static QMetaMethod sigDecrease;-
182 static QMetaMethod sigScrollUp;-
183 static QMetaMethod sigScrollDown;-
184 static QMetaMethod sigScrollLeft;-
185 static QMetaMethod sigScrollRight;-
186 static QMetaMethod sigPreviousPage;-
187 static QMetaMethod sigNextPage;-
188-
189public:-
190 using QObject::property;-
191};-
192-
193-
194-
195-
196 template <> struct QMetaTypeId< QQuickAccessibleAttached * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickAccessibleAttached * >("QQuickAccessibleAttached *", reinterpret_cast< QQuickAccessibleAttached * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickAccessibleAttached> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListProperty<QQuickAccessibleAttached> >("QQmlListProperty<QQuickAccessibleAttached>", reinterpret_cast< QQmlListProperty<QQuickAccessibleAttached> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
197 template <> class QQmlTypeInfo<QQuickAccessibleAttached > { public: enum { hasAttachedProperties = (((QML_HAS_ATTACHED_PROPERTIES) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) }; };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0