constant_mappings.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/linuxaccessibility/constant_mappings.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QHash <QAccessible::Role, RoleNames> qSpiRoleMapping;-
5-
6quint64 spiStatesFromQState(QAccessible::State state)-
7{-
8 quint64 spiState = 0;-
9-
10 if (state.active
state.activeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
11 setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE);
0
12 if (state.editable
state.editableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
13 setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
0
14 if (!state.disabled
!state.disabledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
15 setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);-
16 setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);-
17 }
never executed: end of block
0
18 if (state.selected
state.selectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
19 setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
0
20 if (state.focused
state.focusedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
21 setSpiStateBit(&spiState, ATSPI_STATE_FOCUSED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_FOCUSED);
0
22 if (state.pressed
state.pressedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
23 setSpiStateBit(&spiState, ATSPI_STATE_PRESSED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_PRESSED);
0
24 if (state.checked
state.checkedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
25 setSpiStateBit(&spiState, ATSPI_STATE_CHECKED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_CHECKED);
0
26 if (state.checkStateMixed
state.checkStateMixedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
27 setSpiStateBit(&spiState, ATSPI_STATE_INDETERMINATE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_INDETERMINATE);
0
28 if (state.readOnly
state.readOnlyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
29 unsetSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
never executed: unsetSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
0
30-
31 if (state.defaultButton
state.defaultButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
32 setSpiStateBit(&spiState, ATSPI_STATE_IS_DEFAULT);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_IS_DEFAULT);
0
33 if (state.expanded
state.expandedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
34 setSpiStateBit(&spiState, ATSPI_STATE_EXPANDED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_EXPANDED);
0
35 if (state.collapsed
state.collapsedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
36 setSpiStateBit(&spiState, ATSPI_STATE_COLLAPSED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_COLLAPSED);
0
37 if (state.busy
state.busyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
38 setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
0
39 if (state.marqueed
state.marqueedDescription
TRUEnever evaluated
FALSEnever evaluated
|| state.animated
state.animatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
40 setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
0
41 if (!state.invisible
!state.invisibleDescription
TRUEnever evaluated
FALSEnever evaluated
&& !state.offscreen
!state.offscreenDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
42 setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);-
43 setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);-
44 }
never executed: end of block
0
45 if (state.sizeable
state.sizeableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
46 setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
0
47-
48-
49 if (state.focusable
state.focusableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
50 setSpiStateBit(&spiState, ATSPI_STATE_FOCUSABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_FOCUSABLE);
0
51 if (state.selectable
state.selectableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
52 setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE);
0
53-
54 if (state.traversed
state.traversedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
55 setSpiStateBit(&spiState, ATSPI_STATE_VISITED);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_VISITED);
0
56 if (state.multiSelectable
state.multiSelectableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
57 setSpiStateBit(&spiState, ATSPI_STATE_MULTISELECTABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_MULTISELECTABLE);
0
58 if (state.extSelectable
state.extSelectableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
59 setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE);
0
60-
61-
62 if (state.modal
state.modalDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
63 setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
0
64 if (state.multiLine
state.multiLineDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
65 setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE);
never executed: setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE);
0
66-
67 return
never executed: return spiState;
spiState;
never executed: return spiState;
0
68}-
69-
70QSpiUIntList spiStateSetFromSpiStates(quint64 states)-
71{-
72 uint low = states & 0xFFFFFFFF;-
73 uint high = (states >> 32) & 0xFFFFFFFF;-
74-
75 QSpiUIntList stateList;-
76 stateList.append(low);-
77 stateList.append(high);-
78 return
never executed: return stateList;
stateList;
never executed: return stateList;
0
79}-
80-
81AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relation)-
82{-
83 switch (relation) {-
84 case
never executed: case QAccessible::Label:
QAccessible::Label:
never executed: case QAccessible::Label:
0
85 return
never executed: return ATSPI_RELATION_LABELLED_BY;
ATSPI_RELATION_LABELLED_BY;
never executed: return ATSPI_RELATION_LABELLED_BY;
0
86 case
never executed: case QAccessible::Labelled:
QAccessible::Labelled:
never executed: case QAccessible::Labelled:
0
87 return
never executed: return ATSPI_RELATION_LABEL_FOR;
ATSPI_RELATION_LABEL_FOR;
never executed: return ATSPI_RELATION_LABEL_FOR;
0
88 case
never executed: case QAccessible::Controller:
QAccessible::Controller:
never executed: case QAccessible::Controller:
0
89 return
never executed: return ATSPI_RELATION_CONTROLLED_BY;
ATSPI_RELATION_CONTROLLED_BY;
never executed: return ATSPI_RELATION_CONTROLLED_BY;
0
90 case
never executed: case QAccessible::Controlled:
QAccessible::Controlled:
never executed: case QAccessible::Controlled:
0
91 return
never executed: return ATSPI_RELATION_CONTROLLER_FOR;
ATSPI_RELATION_CONTROLLER_FOR;
never executed: return ATSPI_RELATION_CONTROLLER_FOR;
0
92 default
never executed: default:
:
never executed: default:
0
93 QMessageLogger(__FILE__, 146, __PRETTY_FUNCTION__).warning() << "Cannot return AT-SPI relation for:" << relation;-
94 }
never executed: end of block
0
95 return
never executed: return ATSPI_RELATION_NULL;
ATSPI_RELATION_NULL;
never executed: return ATSPI_RELATION_NULL;
0
96}-
97-
98-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9