OpenCoverage

qxcbconnection_xi2.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5struct XInput2TouchDeviceData {-
6 XInput2TouchDeviceData()-
7 : xiDeviceInfo(0)-
8 , qtTouchDevice(0)-
9 , providesTouchOrientation(false)-
10 {-
11 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
12 XIDeviceInfo *xiDeviceInfo;-
13 QTouchDevice *qtTouchDevice;-
14 QHash<int, QWindowSystemInterface::TouchPoint> touchPoints;-
15-
16-
17 QHash<int, QPointF> pointPressedPosition;-
18 QPointF firstPressedPosition;-
19 QPointF firstPressedNormalPosition;-
20 QSizeF size;-
21 bool providesTouchOrientation;-
22};-
23-
24void QXcbConnection::initializeXInput2()-
25{-
26-
27 if (qEnvironmentVariableIsSet("QT_XCB_DEBUG_XINPUT")
qEnvironmentVa...DEBUG_XINPUT")Description
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-135
28 const_cast<
never executed: const_cast<QLoggingCategory&>(lcQpaXInput()).setEnabled(QtDebugMsg, true);
QLoggingCategory&>(lcQpaXInput()).setEnabled(QtDebugMsg, true);
never executed: const_cast<QLoggingCategory&>(lcQpaXInput()).setEnabled(QtDebugMsg, true);
0
29 if (qEnvironmentVariableIsSet("QT_XCB_DEBUG_XINPUT_DEVICES")
qEnvironmentVa...NPUT_DEVICES")Description
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-135
30 const_cast<
never executed: const_cast<QLoggingCategory&>(lcQpaXInputDevices()).setEnabled(QtDebugMsg, true);
QLoggingCategory&>(lcQpaXInputDevices()).setEnabled(QtDebugMsg, true);
never executed: const_cast<QLoggingCategory&>(lcQpaXInputDevices()).setEnabled(QtDebugMsg, true);
0
31 Display *xDisplay = static_cast<Display *>(m_xlib_display);-
32 if (XQueryExtension(xDisplay, "XInputExtension", &m_xiOpCode, &m_xiEventBase, &m_xiErrorBase)
XQueryExtensio...m_xiErrorBase)Description
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-135
33 int xiMajor = 2;-
34 m_xi2Minor = 2;-
35 if (XIQueryVersion(xDisplay, &xiMajor, &m_xi2Minor) == 1
XIQueryVersion...xi2Minor) == 1Description
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-135
36 m_xi2Minor = 1;-
37 if (XIQueryVersion(xDisplay, &xiMajor, &m_xi2Minor) == 1
XIQueryVersion...xi2Minor) == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
38 m_xi2Minor = 0;-
39 m_xi2Enabled = XIQueryVersion(xDisplay, &xiMajor, &m_xi2Minor) != 1;-
40 }
never executed: end of block
else
0
41 m_xi2Enabled = true;
never executed: m_xi2Enabled = true;
0
42 } else-
43 m_xi2Enabled = true;
executed 135 times by 5 tests: m_xi2Enabled = true;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
44 if (m_xi2Enabled
m_xi2EnabledDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-135
45-
46 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; qt_category_enabled = false) QMessageLogger(__FILE__, 95, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("XInput version %d.%d is available and Qt supports 2.2 or greater", xiMajor, m_xi2Minor);
never executed: QMessageLogger(__FILE__, 95, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("XInput version %d.%d is available and Qt supports 2.2 or greater", xiMajor, m_xi2Minor);
0-135
47-
48-
49-
50 }
executed 135 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
51-
52 xi2SetupDevices();-
53 }
executed 135 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
54}
executed 135 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
55-
56void QXcbConnection::xi2SetupDevices()-
57{-
58-
59 m_tabletData.clear();-
60-
61 m_scrollingDevices.clear();-
62-
63 if (!m_xi2Enabled
!m_xi2EnabledDescription
TRUEnever evaluated
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-135
64 return;
never executed: return;
0
65-
66 Display *xDisplay = static_cast<Display *>(m_xlib_display);-
67 int deviceCount = 0;-
68 XIDeviceInfo *devices = XIQueryDevice(xDisplay, 0, &deviceCount);-
69 for (int i = 0; i < deviceCount
i < deviceCountDescription
TRUEevaluated 1215 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; ++i) {
135-1215
70-
71 if (devices[i].use != 3
devices[i].use != 3Description
TRUEevaluated 675 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
540-675
72 continue;
executed 675 times by 5 tests: continue;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
675
73 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; qt_category_enabled = false) QMessageLogger(__FILE__, 122, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << "input device " << devices[i].name << "ID" << devices[i].deviceid;
never executed: QMessageLogger(__FILE__, 122, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << "input device " << devices[i].name << "ID" << devices[i].deviceid;
0-540
74-
75 TabletData tabletData;-
76-
77 ScrollingDevice scrollingDevice;-
78 for (int c = 0; c < devices[i].num_classes
c < devices[i].num_classesDescription
TRUEevaluated 2700 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; ++c) {
540-2700
79 switch (devices[i].classes[c]->type) {-
80 case
executed 1620 times by 5 tests: case 2:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
2:
executed 1620 times by 5 tests: case 2:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
{
1620
81 XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(devices[i].classes[c]);-
82 const int valuatorAtom = qatom(vci->label);-
83 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; qt_category_enabled = false) QMessageLogger(__FILE__, 132, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " has valuator" << atomName(vci->label) << "recognized?" << (valuatorAtom < QXcbAtom::NAtoms);
never executed: QMessageLogger(__FILE__, 132, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " has valuator" << atomName(vci->label) << "recognized?" << (valuatorAtom < QXcbAtom::NAtoms);
0-1620
84-
85 if (valuatorAtom < QXcbAtom::NAtoms
valuatorAtom <...cbAtom::NAtomsDescription
TRUEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-1620
86 TabletData::ValuatorClassInfo info;-
87 info.minVal = vci->min;-
88 info.maxVal = vci->max;-
89 info.number = vci->number;-
90 tabletData.valuatorInfo[valuatorAtom] = info;-
91 }
executed 1620 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1620
92-
93 if (valuatorAtom == QXcbAtom::RelHorizScroll
valuatorAtom =...RelHorizScrollDescription
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| valuatorAtom == QXcbAtom::RelHorizWheel
valuatorAtom =...:RelHorizWheelDescription
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1350 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1620
94 scrollingDevice.lastScrollPosition.setX(vci->value);
executed 270 times by 5 tests: scrollingDevice.lastScrollPosition.setX(vci->value);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
270
95 else if (valuatorAtom == QXcbAtom::RelVertScroll
valuatorAtom =...:RelVertScrollDescription
TRUEnever evaluated
FALSEevaluated 1350 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| valuatorAtom == QXcbAtom::RelVertWheel
valuatorAtom =...::RelVertWheelDescription
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1080 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1350
96 scrollingDevice.lastScrollPosition.setY(vci->value);
executed 270 times by 5 tests: scrollingDevice.lastScrollPosition.setY(vci->value);
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
270
97 break;
executed 1620 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1620
98 }-
99-
100 case
executed 540 times by 5 tests: case 3:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
3:
executed 540 times by 5 tests: case 3:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
{
540
101 XIScrollClassInfo *sci = reinterpret_cast<XIScrollClassInfo *>(devices[i].classes[c]);-
102 if (sci->scroll_type == 1
sci->scroll_type == 1Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
270
103 scrollingDevice.orientations |= Qt::Vertical;-
104 scrollingDevice.verticalIndex = sci->number;-
105 scrollingDevice.verticalIncrement = sci->increment;-
106 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
270
107 else if (sci->scroll_type == 2
sci->scroll_type == 2Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-270
108 scrollingDevice.orientations |= Qt::Horizontal;-
109 scrollingDevice.horizontalIndex = sci->number;-
110 scrollingDevice.horizontalIncrement = sci->increment;-
111 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
270
112 break;
executed 540 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
113 }-
114 case
executed 540 times by 5 tests: case 1:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1:
executed 540 times by 5 tests: case 1:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
{
540
115 XIButtonClassInfo *bci = reinterpret_cast<XIButtonClassInfo *>(devices[i].classes[c]);-
116 if (bci->num_buttons >= 5
bci->num_buttons >= 5Description
TRUEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-540
117 Atom label4 = bci->labels[3];-
118 Atom label5 = bci->labels[4];-
119-
120-
121 if ((!label4
!label4Description
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| qatom(label4) == QXcbAtom::ButtonWheelUp
qatom(label4) ...:ButtonWheelUpDescription
TRUEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
|| qatom(label4) == QXcbAtom::ButtonWheelDown
qatom(label4) ...uttonWheelDownDescription
TRUEnever evaluated
FALSEnever evaluated
) &&
0-405
122 (!label5
!label5Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| qatom(label5) == QXcbAtom::ButtonWheelUp
qatom(label5) ...:ButtonWheelUpDescription
TRUEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| qatom(label5) == QXcbAtom::ButtonWheelDown
qatom(label5) ...uttonWheelDownDescription
TRUEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
))
0-540
123 scrollingDevice.legacyOrientations |= Qt::Vertical;
executed 540 times by 5 tests: scrollingDevice.legacyOrientations |= Qt::Vertical;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
124 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
125 if (bci->num_buttons >= 7
bci->num_buttons >= 7Description
TRUEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 135 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
135-405
126 Atom label6 = bci->labels[5];-
127 Atom label7 = bci->labels[6];-
128 if ((!label6
!label6Description
TRUEnever evaluated
FALSEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| qatom(label6) == QXcbAtom::ButtonHorizWheelLeft
qatom(label6) ...HorizWheelLeftDescription
TRUEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) && (!label7
!label7Description
TRUEnever evaluated
FALSEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| qatom(label7) == QXcbAtom::ButtonHorizWheelRight
qatom(label7) ...orizWheelRightDescription
TRUEevaluated 405 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
))
0-405
129 scrollingDevice.legacyOrientations |= Qt::Horizontal;
executed 405 times by 5 tests: scrollingDevice.legacyOrientations |= Qt::Horizontal;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
405
130 }
executed 405 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
405
131 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; qt_category_enabled = false) QMessageLogger(__FILE__, 180, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" has %d buttons", bci->num_buttons);
never executed: QMessageLogger(__FILE__, 180, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" has %d buttons", bci->num_buttons);
0-540
132 break;
executed 540 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
133 }-
134-
135 case
never executed: case 0:
0:
never executed: case 0:
0
136 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 185, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a keyboard";
never executed: QMessageLogger(__FILE__, 185, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a keyboard";
0
137 break;
never executed: break;
0
138-
139 case
never executed: case 8:
8:
never executed: case 8:
0
140-
141 break;
never executed: break;
0
142-
143 default
never executed: default:
:
never executed: default:
0
144 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 193, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " has class" << devices[i].classes[c]->type;
never executed: QMessageLogger(__FILE__, 193, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " has class" << devices[i].classes[c]->type;
0
145 break;
never executed: break;
0
146 }-
147 }-
148 bool isTablet = false;-
149-
150-
151 if (tabletData.valuatorInfo.contains(QXcbAtom::AbsX)
tabletData.val...XcbAtom::AbsX)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&&
270
152 tabletData.valuatorInfo.contains(QXcbAtom::AbsY)
tabletData.val...XcbAtom::AbsY)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&&
0-270
153 tabletData.valuatorInfo.contains(QXcbAtom::AbsPressure)
tabletData.val...::AbsPressure)Description
TRUEnever evaluated
FALSEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-270
154 isTablet = true;
never executed: isTablet = true;
0
155-
156-
157 QByteArray name = QByteArray(devices[i].name).toLower();-
158 QString dbgType = QLatin1String("UNKNOWN");-
159 if (name.contains("eraser")
name.contains("eraser")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
160 isTablet = true;-
161 tabletData.pointerType = QTabletEvent::Eraser;-
162 dbgType = QLatin1String("eraser");-
163 }
never executed: end of block
else if (name.contains("cursor")
name.contains("cursor")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
164 isTablet = true;-
165 tabletData.pointerType = QTabletEvent::Cursor;-
166 dbgType = QLatin1String("cursor");-
167 }
never executed: end of block
else if ((name.contains("pen")
name.contains("pen")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| name.contains("stylus")
name.contains("stylus")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) && isTablet
isTabletDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-540
168 tabletData.pointerType = QTabletEvent::Pen;-
169 dbgType = QLatin1String("pen");-
170 }
never executed: end of block
else if (name.contains("wacom")
name.contains("wacom")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&& isTablet
isTabletDescription
TRUEnever evaluated
FALSEnever evaluated
&& !name.contains("touch")
!name.contains("touch")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-540
171-
172 tabletData.pointerType = QTabletEvent::Pen;-
173 dbgType = QLatin1String("pen");-
174 }
never executed: end of block
else if (name.contains("aiptek")
name.contains("aiptek")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
175-
176 isTablet = true;-
177 tabletData.pointerType = QTabletEvent::Pen;-
178 dbgType = QLatin1String("pen");-
179 }
never executed: end of block
else if (name.contains("waltop")
name.contains("waltop")Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&& name.contains("tablet")
name.contains("tablet")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-540
180-
181-
182 isTablet = true;-
183 tabletData.pointerType = QTabletEvent::Pen;-
184 dbgType = QLatin1String("pen");-
185 }
never executed: end of block
else {
0
186 isTablet = false;-
187 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
188-
189 if (isTablet
isTabletDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
190 tabletData.deviceId = devices[i].deviceid;-
191 m_tabletData.append(tabletData);-
192 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 241, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a tablet with pointer type" << dbgType;
never executed: QMessageLogger(__FILE__, 241, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a tablet with pointer type" << dbgType;
0
193 }
never executed: end of block
0
194-
195-
196-
197 if (scrollingDevice.orientations || scrollingDevice.legacyOrientations) {-
198 scrollingDevice.deviceId = devices[i].deviceid;-
199-
200 scrollingDevice.legacyOrientations &= ~scrollingDevice.orientations;-
201 m_scrollingDevices.insert(scrollingDevice.deviceId, scrollingDevice);-
202 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; qt_category_enabled = false) QMessageLogger(__FILE__, 251, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a scrolling device";
never executed: QMessageLogger(__FILE__, 251, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug() << " it's a scrolling device";
0-540
203 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
204-
205-
206 if (!isTablet
!isTabletDescription
TRUEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
) {
0-540
207-
208-
209 XInput2TouchDeviceData *dev = touchDeviceForId(devices[i].deviceid);-
210 if (dev
devDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&& lcQpaXInputDevices().isDebugEnabled()
lcQpaXInputDev...DebugEnabled()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-540
211 if (dev->qtTouchDevice->type() == QTouchDevice::TouchScreen
dev->qtTouchDe...e::TouchScreenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
212 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
2130
214 __FILE__
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
215 ,
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
2160
217 263
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
218 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints())
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
2190
220 ;
never executed: QMessageLogger( __FILE__ , 263 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchscreen with type %d capabilities 0x%X max touch points %d", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints()) ;
0
221 else if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad
dev->qtTouchDe...vice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
222 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
2230
2240
225 __FILE__
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
226 ,
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
2270
2280
229 268
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
230 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height())
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
2310
2320
233 ;
never executed: QMessageLogger( __FILE__ , 268 , __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" it's a touchpad with type %d capabilities 0x%X max touch points %d size %f x %f", dev->qtTouchDevice->type(), (unsigned int)dev->qtTouchDevice->capabilities(), dev->qtTouchDevice->maximumTouchPoints(), dev->size.width(), dev->size.height()) ;
0
234 }
never executed: end of block
0
235 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
236 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
237 XIFreeDeviceInfo(devices);-
238}
executed 135 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
135
239-
240void QXcbConnection::finalizeXInput2()-
241{-
242 for (XInput2TouchDeviceData *dev : qAsConst(m_touchDevices)) {-
243 if (dev->xiDeviceInfo
dev->xiDeviceInfoDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
244 XIFreeDeviceInfo(dev->xiDeviceInfo);
never executed: XIFreeDeviceInfo(dev->xiDeviceInfo);
0
245 delete dev;-
246 }
never executed: end of block
0
247}
executed 347 times by 219 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qbackingstore - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbrush - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qclipboard - unknown status
  • ...
347
248-
249void QXcbConnection::xi2Select(xcb_window_t window)-
250{-
251 if (!m_xi2Enabled
!m_xi2EnabledDescription
TRUEnever evaluated
FALSEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
|| window == rootWindow()
window == rootWindow()Description
TRUEnever evaluated
FALSEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
)
0-4107
252 return;
never executed: return;
0
253-
254 Display *xDisplay = static_cast<Display *>(m_xlib_display);-
255 unsigned int bitMask = 0;-
256 unsigned char *xiBitMask = reinterpret_cast<unsigned char *>(&bitMask);-
257-
258-
259 if (isAtLeastXI22()
isAtLeastXI22()Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
) {
0-4107
260 bitMask |= (1 << 18);-
261 bitMask |= (1 << 19);-
262 bitMask |= (1 << 20);-
263 bitMask |= (1 << 12);-
264 if (xi2MouseEvents()
xi2MouseEvents()Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
) {
0-4107
265-
266-
267 bitMask |= (1 << 4);-
268 bitMask |= (1 << 5);-
269 bitMask |= (1 << 6);-
270-
271-
272 bitMask |= (1 << 7);-
273 bitMask |= (1 << 8);-
274-
275 for (bool qt_category_enabled = lcQpaXInput().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
; qt_category_enabled = false) QMessageLogger(__FILE__, 310, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: Selecting press/release/motion events in addition to touch");
never executed: QMessageLogger(__FILE__, 310, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: Selecting press/release/motion events in addition to touch");
0-4107
276 }
executed 4107 times by 125 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
4107
277 XIEventMask mask;-
278 mask.mask_len = sizeof(bitMask);-
279 mask.mask = xiBitMask;-
280-
281-
282-
283 mask.deviceid = 1;-
284 int result = XISelectEvents(xDisplay, window, &mask, 1);-
285 if (result == 0
result == 0Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
)
0-4107
286 QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false);
executed 4107 times by 125 tests: QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
4107
287 else-
288 for (bool qt_category_enabled = lcQpaXInput().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 323, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to select pointer/touch events, window %x, result %d", window, result);
never executed: QMessageLogger(__FILE__, 323, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to select pointer/touch events, window %x, result %d", window, result);
0
289 }
executed 4107 times by 125 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
4107
290-
291 const bool pointerSelected = isAtLeastXI22()
isAtLeastXI22()Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
&& xi2MouseEvents()
xi2MouseEvents()Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
;
0-4107
292-
293-
294-
295-
296 QSet<int> tabletDevices;-
297-
298 if (!m_tabletData.isEmpty()
!m_tabletData.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
) {
0-4107
299 unsigned int tabletBitMask;-
300 unsigned char *xiTabletBitMask = reinterpret_cast<unsigned char *>(&tabletBitMask);-
301 QVector<XIEventMask> xiEventMask(m_tabletData.count());-
302 tabletBitMask = (1 << 12);-
303 if (!pointerSelected
!pointerSelectedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
304 tabletBitMask |= (1 << 4) | (1 << 5) | (1 << 6);
never executed: tabletBitMask |= (1 << 4) | (1 << 5) | (1 << 6);
0
305 for (int i = 0; i < m_tabletData.count()
i < m_tabletData.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
306 int deviceId = m_tabletData.at(i).deviceId;-
307 tabletDevices.insert(deviceId);-
308 xiEventMask[i].deviceid = deviceId;-
309 xiEventMask[i].mask_len = sizeof(tabletBitMask);-
310 xiEventMask[i].mask = xiTabletBitMask;-
311 }
never executed: end of block
0
312 XISelectEvents(xDisplay, window, xiEventMask.data(), m_tabletData.count());-
313 }
never executed: end of block
0
314-
315-
316-
317-
318 if (!m_scrollingDevices.isEmpty()
!m_scrollingDevices.isEmpty()Description
TRUEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
&& !pointerSelected
!pointerSelectedDescription
TRUEnever evaluated
FALSEevaluated 4107 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
) {
0-4107
319-
320 QVector<XIEventMask> xiEventMask(m_scrollingDevices.size());-
321 unsigned int scrollBitMask;-
322 unsigned char *xiScrollBitMask = reinterpret_cast<unsigned char *>(&scrollBitMask);-
323-
324 scrollBitMask = (1 << 6);-
325 scrollBitMask |= (1 << 5);-
326 int i=0;-
327 for (const ScrollingDevice& scrollingDevice : qAsConst(m_scrollingDevices)) {-
328 if (tabletDevices.contains(scrollingDevice.deviceId)
tabletDevices....vice.deviceId)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
329 continue;
never executed: continue;
0
330 xiEventMask[i].deviceid = scrollingDevice.deviceId;-
331 xiEventMask[i].mask_len = sizeof(scrollBitMask);-
332 xiEventMask[i].mask = xiScrollBitMask;-
333 i++;-
334 }
never executed: end of block
0
335 XISelectEvents(xDisplay, window, xiEventMask.data(), i);-
336 }
never executed: end of block
0
337-
338-
339-
340-
341 {-
342-
343 XIEventMask xiEventMask;-
344 bitMask = (1 << 11);-
345 bitMask |= (1 << 1);-
346 xiEventMask.deviceid = 0;-
347 xiEventMask.mask_len = sizeof(bitMask);-
348 xiEventMask.mask = xiBitMask;-
349 XISelectEvents(xDisplay, window, &xiEventMask, 1);-
350 }-
351}
executed 4107 times by 125 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
4107
352-
353XInput2TouchDeviceData *QXcbConnection::touchDeviceForId(int id)-
354{-
355 XInput2TouchDeviceData *dev = nullptr;-
356 QHash<int, XInput2TouchDeviceData*>::const_iterator devIt = m_touchDevices.constFind(id);-
357 if (devIt != m_touchDevices.cend()
devIt != m_touchDevices.cend()Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
358 dev = devIt.value();-
359 }
never executed: end of block
else {
0
360 int nrDevices = 0;-
361 QTouchDevice::Capabilities caps = 0;-
362 dev = new XInput2TouchDeviceData;-
363 dev->xiDeviceInfo = XIQueryDevice(static_cast<Display *>(m_xlib_display), id, &nrDevices);-
364 if (nrDevices <= 0
nrDevices <= 0Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
365 delete dev;-
366 return
never executed: return 0;
0;
never executed: return 0;
0
367 }-
368 int type = -1;-
369 int maxTouchPoints = 1;-
370 bool hasRelativeCoords = false;-
371 for (int i = 0; i < dev->xiDeviceInfo->num_classes
i < dev->xiDev...o->num_classesDescription
TRUEevaluated 2700 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
; ++i) {
540-2700
372 XIAnyClassInfo *classinfo = dev->xiDeviceInfo->classes[i];-
373 switch (classinfo->type) {-
374-
375 case
never executed: case 8:
8:
never executed: case 8:
{
0
376 XITouchClassInfo *tci = reinterpret_cast<XITouchClassInfo *>(classinfo);-
377 maxTouchPoints = tci->num_touches;-
378 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 413, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" has touch class with mode %d", tci->mode);
never executed: QMessageLogger(__FILE__, 413, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug(" has touch class with mode %d", tci->mode);
0
379 switch (tci->mode) {-
380 case
never executed: case 2:
2:
never executed: case 2:
0
381 type = QTouchDevice::TouchPad;-
382 break;
never executed: break;
0
383 case
never executed: case 1:
1:
never executed: case 1:
0
384 type = QTouchDevice::TouchScreen;-
385 break;
never executed: break;
0
386 }-
387 break;
never executed: break;
0
388 }-
389-
390 case
executed 1620 times by 5 tests: case 2:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
2:
executed 1620 times by 5 tests: case 2:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
{
1620
391 XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classinfo);-
392-
393-
394 const int vciResolution = vci->resolution
vci->resolutionDescription
TRUEevaluated 810 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 810 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
? vci->resolution : 1;
810
395 if (vci->label == atom(QXcbAtom::AbsMTPositionX)
vci->label == ...bsMTPositionX)Description
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1620
396 caps |= QTouchDevice::Position | QTouchDevice::NormalizedPosition;
never executed: caps |= QTouchDevice::Position | QTouchDevice::NormalizedPosition;
0
397 else if (vci->label == atom(QXcbAtom::AbsMTTouchMajor)
vci->label == ...sMTTouchMajor)Description
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1620
398 caps |= QTouchDevice::Area;
never executed: caps |= QTouchDevice::Area;
0
399 else if (vci->label == atom(QXcbAtom::AbsMTOrientation)
vci->label == ...MTOrientation)Description
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1620
400 dev->providesTouchOrientation = true;
never executed: dev->providesTouchOrientation = true;
0
401 else if (vci->label == atom(QXcbAtom::AbsMTPressure)
vci->label == ...AbsMTPressure)Description
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| vci->label == atom(QXcbAtom::AbsPressure)
vci->label == ...::AbsPressure)Description
TRUEnever evaluated
FALSEevaluated 1620 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-1620
402 caps |= QTouchDevice::Pressure;
never executed: caps |= QTouchDevice::Pressure;
0
403 else if (vci->label == atom(QXcbAtom::RelX)
vci->label == ...XcbAtom::RelX)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1350 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
270-1350
404 hasRelativeCoords = true;-
405 dev->size.setWidth((vci->max - vci->min) * 1000.0 / vciResolution);-
406 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (vci->label == atom(QXcbAtom::RelY)
vci->label == ...XcbAtom::RelY)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1080 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
270-1080
407 hasRelativeCoords = true;-
408 dev->size.setHeight((vci->max - vci->min) * 1000.0 / vciResolution);-
409 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (vci->label == atom(QXcbAtom::AbsX)
vci->label == ...XcbAtom::AbsX)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 810 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
270-810
410 caps |= QTouchDevice::Position;-
411 dev->size.setHeight((vci->max - vci->min) * 1000.0 / vciResolution);-
412 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
else if (vci->label == atom(QXcbAtom::AbsY)
vci->label == ...XcbAtom::AbsY)Description
TRUEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
270-540
413 caps |= QTouchDevice::Position;-
414 dev->size.setWidth((vci->max - vci->min) * 1000.0 / vciResolution);-
415 }
executed 270 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
270
416 break;
executed 1620 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1620
417 }-
418 default
executed 1080 times by 5 tests: default:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
:
executed 1080 times by 5 tests: default:
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1080
419 break;
executed 1080 times by 5 tests: break;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
1080
420 }-
421 }-
422 if (type < 0
type < 0Description
TRUEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
&& caps && hasRelativeCoords
hasRelativeCoordsDescription
TRUEnever evaluated
FALSEevaluated 270 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-540
423 type = QTouchDevice::TouchPad;-
424 if (dev->size.width() < 10
dev->size.width() < 10Description
TRUEnever evaluated
FALSEnever evaluated
|| dev->size.height() < 10
dev->size.height() < 10Description
TRUEnever evaluated
FALSEnever evaluated
||
0
425 dev->size.width() > 10000
dev->size.width() > 10000Description
TRUEnever evaluated
FALSEnever evaluated
|| dev->size.height() > 10000
dev->size.height() > 10000Description
TRUEnever evaluated
FALSEnever evaluated
)
0
426 dev->size = QSizeF(130, 110);
never executed: dev->size = QSizeF(130, 110);
0
427 }
never executed: end of block
0
428 if (!isAtLeastXI22()
!isAtLeastXI22()Description
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
|| type == QTouchDevice::TouchPad
type == QTouchDevice::TouchPadDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
)
0-540
429 caps |= QTouchDevice::MouseEmulation;
never executed: caps |= QTouchDevice::MouseEmulation;
0
430-
431 if (type >= QTouchDevice::TouchScreen
type >= QTouch...e::TouchScreenDescription
TRUEnever evaluated
FALSEevaluated 540 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&& type <= QTouchDevice::TouchPad
type <= QTouchDevice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-540
432 dev->qtTouchDevice = new QTouchDevice;-
433 dev->qtTouchDevice->setName(QString::fromUtf8(dev->xiDeviceInfo->name));-
434 dev->qtTouchDevice->setType((QTouchDevice::DeviceType)type);-
435 dev->qtTouchDevice->setCapabilities(caps);-
436 dev->qtTouchDevice->setMaximumTouchPoints(maxTouchPoints);-
437 if (caps != 0
caps != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
438 QWindowSystemInterface::registerTouchDevice(dev->qtTouchDevice);
never executed: QWindowSystemInterface::registerTouchDevice(dev->qtTouchDevice);
0
439 m_touchDevices[id] = dev;-
440 }
never executed: end of block
else {
0
441 XIFreeDeviceInfo(dev->xiDeviceInfo);-
442 delete dev;-
443 dev = 0;-
444 }
executed 540 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
445 }-
446 return
executed 540 times by 5 tests: return dev;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
dev;
executed 540 times by 5 tests: return dev;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
540
447}-
448-
449-
450static inline qreal fixed1616ToReal(FP1616 val)-
451{-
452 return
never executed: return qreal(val) / 0x10000;
qreal(val) / 0x10000;
never executed: return qreal(val) / 0x10000;
0
453}-
454-
455-
456void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)-
457{-
458 xi2PrepareXIGenericDeviceEvent(event);-
459 xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);-
460 int sourceDeviceId = xiEvent->deviceid;-
461 xXIDeviceEvent *xiDeviceEvent = 0;-
462 xXIEnterEvent *xiEnterEvent = 0;-
463 QXcbWindowEventListener *eventListener = 0;-
464-
465 switch (xiEvent->evtype) {-
466 case
never executed: case 4:
4:
never executed: case 4:
0
467 case
never executed: case 5:
5:
never executed: case 5:
0
468 case
executed 464 times by 18 tests: case 6:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
6:
executed 464 times by 18 tests: case 6:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
464
469-
470 case
never executed: case 18:
18:
never executed: case 18:
0
471 case
never executed: case 19:
19:
never executed: case 19:
0
472 case
never executed: case 20:
20:
never executed: case 20:
0
473-
474 {-
475 xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);-
476 eventListener = windowEventListenerFromId(xiDeviceEvent->event);-
477 sourceDeviceId = xiDeviceEvent->sourceid;-
478 break;
executed 464 times by 18 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
464
479 }-
480 case
executed 889 times by 70 tests: case 7:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
7:
executed 889 times by 70 tests: case 7:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
889
481 case
executed 832 times by 58 tests: case 8:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • ...
8:
executed 832 times by 58 tests: case 8:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • ...
{
832
482 xiEnterEvent = reinterpret_cast<xXIEnterEvent *>(event);-
483 eventListener = windowEventListenerFromId(xiEnterEvent->event);-
484 sourceDeviceId = xiEnterEvent->sourceid;-
485 break;
executed 1721 times by 70 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
1721
486 }-
487 case
never executed: case 11:
11:
never executed: case 11:
0
488 xi2HandleHierachyEvent(xiEvent);-
489 return;
never executed: return;
0
490 case
never executed: case 1:
1:
never executed: case 1:
0
491 xi2HandleDeviceChangedEvent(xiEvent);-
492 return;
never executed: return;
0
493 default
never executed: default:
:
never executed: default:
0
494 break;
never executed: break;
0
495 }-
496-
497 if (eventListener
eventListenerDescription
TRUEevaluated 1319 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 866 times by 54 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • ...
) {
866-1319
498 long result = 0;-
499 if (eventListener->handleGenericEvent(reinterpret_cast<xcb_generic_event_t *>(event), &result)
eventListener-...ent), &result)Description
TRUEnever evaluated
FALSEevaluated 1319 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-1319
500 return;
never executed: return;
0
501 }
executed 1319 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
1319
502-
503-
504 if (!xiEnterEvent
!xiEnterEventDescription
TRUEevaluated 464 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
FALSEevaluated 1721 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
) {
464-1721
505 QXcbConnection::TabletData *tablet = tabletDataForDevice(sourceDeviceId);-
506 if (tablet
tabletDescription
TRUEnever evaluated
FALSEevaluated 464 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
&& xi2HandleTabletEvent(xiEvent, tablet)
xi2HandleTable...Event, tablet)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-464
507 return;
never executed: return;
0
508 }
executed 464 times by 18 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
464
509-
510-
511-
512 QHash<int, ScrollingDevice>::iterator device = m_scrollingDevices.find(sourceDeviceId);-
513 if (device != m_scrollingDevices.end()
device != m_sc...gDevices.end()Description
TRUEnever evaluated
FALSEevaluated 2185 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-2185
514 xi2HandleScrollEvent(xiEvent, device.value());
never executed: xi2HandleScrollEvent(xiEvent, device.value());
0
515-
516-
517-
518 if (xiDeviceEvent
xiDeviceEventDescription
TRUEevaluated 464 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
FALSEevaluated 1721 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
) {
464-1721
519 switch (xiDeviceEvent->evtype) {-
520 case
never executed: case 4:
4:
never executed: case 4:
0
521 case
never executed: case 5:
5:
never executed: case 5:
0
522 case
executed 464 times by 18 tests: case 6:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
6:
executed 464 times by 18 tests: case 6:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
464
523 if (xi2MouseEvents()
xi2MouseEvents()Description
TRUEevaluated 464 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
FALSEnever evaluated
&& eventListener
eventListenerDescription
TRUEevaluated 453 times by 17 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
FALSEevaluated 11 times by 6 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QMenuBar
  • tst_QTableView
&& !(xiDeviceEvent->flags & (1 << 16))
!(xiDeviceEven...s & (1 << 16))Description
TRUEevaluated 453 times by 17 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
FALSEnever evaluated
)
0-464
524 eventListener->handleXIMouseEvent(event);
executed 453 times by 17 tests: eventListener->handleXIMouseEvent(event);
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
453
525 break;
executed 464 times by 18 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
464
526-
527 case
never executed: case 18:
18:
never executed: case 18:
0
528 case
never executed: case 19:
19:
never executed: case 19:
0
529 case
never executed: case 20:
20:
never executed: case 20:
0
530 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled()), false)
__builtin_expe...led()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
531 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
5320
5330
534 __FILE__
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
535 ,
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
5360
5370
538 569
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
539 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event)
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
5400
5410
542 ;
never executed: QMessageLogger( __FILE__ , 569 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 touch event type %d seq %d detail %d pos %6.1f, %6.1f root pos %6.1f, %6.1f on window %x", event->event_type, xiDeviceEvent->sequenceNumber, xiDeviceEvent->detail, fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y), fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y),xiDeviceEvent->event) ;
0
543 if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event)
QXcbWindow *pl...eEvent->event)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
544 xi2ProcessTouch(xiDeviceEvent, platformWindow);
never executed: xi2ProcessTouch(xiDeviceEvent, platformWindow);
0
545 break;
never executed: break;
0
546 }-
547 }
executed 464 times by 18 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
else if (xiEnterEvent
xiEnterEventDescription
TRUEevaluated 1721 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEnever evaluated
&& xi2MouseEvents()
xi2MouseEvents()Description
TRUEevaluated 1721 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEnever evaluated
&& eventListener
eventListenerDescription
TRUEevaluated 866 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 855 times by 54 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • ...
) {
0-1721
548 switch (xiEnterEvent->evtype) {-
549 case
executed 719 times by 70 tests: case 7:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
7:
executed 719 times by 70 tests: case 7:
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
719
550 case
executed 147 times by 27 tests: case 8:
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QListView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QOpenGLWidget
  • tst_QPushButton
  • tst_QStyleSheetStyle
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWindow
  • ...
8:
executed 147 times by 27 tests: case 8:
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QListView
  • tst_QListWidget
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QOpenGLWidget
  • tst_QPushButton
  • tst_QStyleSheetStyle
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_QWidget
  • tst_QWindow
  • ...
147
551 eventListener->handleXIEnterLeave(event);-
552 break;
executed 866 times by 70 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
866
553 }-
554 }
executed 866 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
866
555-
556}
executed 2185 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
2185
557-
558-
559static qreal valuatorNormalized(double value, XIValuatorClassInfo *vci)-
560{-
561 if (value > vci->max
value > vci->maxDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
562 value = vci->max;
never executed: value = vci->max;
0
563 if (value < vci->min
value < vci->minDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
564 value = vci->min;
never executed: value = vci->min;
0
565 return
never executed: return (value - vci->min) / (vci->max - vci->min);
(value - vci->min) / (vci->max - vci->min);
never executed: return (value - vci->min) / (vci->max - vci->min);
0
566}-
567-
568void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow)-
569{-
570 xXIDeviceEvent *xiDeviceEvent = static_cast<xXIDeviceEvent *>(xiDevEvent);-
571 XInput2TouchDeviceData *dev = touchDeviceForId(xiDeviceEvent->sourceid);-
572 ((!(dev)) ? qt_assert("dev",__FILE__,599) : qt_noop());-
573 const bool firstTouch = dev->touchPoints.isEmpty();-
574 if (xiDeviceEvent->evtype == 18
xiDeviceEvent->evtype == 18Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
575 QWindowSystemInterface::TouchPoint tp;-
576 tp.id = xiDeviceEvent->detail % 2147483647;-
577 tp.state = Qt::TouchPointPressed;-
578 tp.pressure = -1.0;-
579 dev->touchPoints[tp.id] = tp;-
580 }
never executed: end of block
0
581 QWindowSystemInterface::TouchPoint &touchPoint = dev->touchPoints[xiDeviceEvent->detail];-
582 QXcbScreen* screen = platformWindow->xcbScreen();-
583 qreal x = fixed1616ToReal(xiDeviceEvent->root_x);-
584 qreal y = fixed1616ToReal(xiDeviceEvent->root_y);-
585 qreal nx = -1.0, ny = -1.0;-
586 qreal w = 0.0, h = 0.0;-
587 bool majorAxisIsY = touchPoint.area.height() > touchPoint.area.width();-
588 for (int i = 0; i < dev->xiDeviceInfo->num_classes
i < dev->xiDev...o->num_classesDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
589 XIAnyClassInfo *classinfo = dev->xiDeviceInfo->classes[i];-
590 if (classinfo->type == 2
classinfo->type == 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
591 XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classinfo);-
592 int n = vci->number;-
593 double value;-
594 if (!xi2GetValuatorValueIfSet(xiDeviceEvent, n, &value)
!xi2GetValuato...nt, n, &value)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
595 continue;
never executed: continue;
0
596 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled()), false)
__builtin_expe...led()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
597 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
598 __FILE__
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
599 ,
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
600 625
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
601 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max)
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
602 ;
never executed: QMessageLogger( __FILE__ , 625 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug(" valuator %20s value %lf from range %lf -> %lf", atomName(vci->label).constData(), value, vci->min, vci->max) ;
0
603 if (vci->label == atom(QXcbAtom::RelX)
vci->label == ...XcbAtom::RelX)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
604 nx = valuatorNormalized(value, vci);-
605 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::RelY)
vci->label == ...XcbAtom::RelY)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
606 ny = valuatorNormalized(value, vci);-
607 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsX)
vci->label == ...XcbAtom::AbsX)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
608 nx = valuatorNormalized(value, vci);-
609 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsY)
vci->label == ...XcbAtom::AbsY)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
610 ny = valuatorNormalized(value, vci);-
611 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTPositionX)
vci->label == ...bsMTPositionX)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
612 nx = valuatorNormalized(value, vci);-
613 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTPositionY)
vci->label == ...bsMTPositionY)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
614 ny = valuatorNormalized(value, vci);-
615 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTTouchMajor)
vci->label == ...sMTTouchMajor)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
616 const qreal sw = screen->geometry().width();-
617 const qreal sh = screen->geometry().height();-
618 w = valuatorNormalized(value, vci) * std::sqrt(sw * sw + sh * sh);-
619 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTTouchMinor)
vci->label == ...sMTTouchMinor)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
620 const qreal sw = screen->geometry().width();-
621 const qreal sh = screen->geometry().height();-
622 h = valuatorNormalized(value, vci) * std::sqrt(sw * sw + sh * sh);-
623 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTOrientation)
vci->label == ...MTOrientation)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
624-
625-
626-
627-
628-
629 value = qAbs(value);-
630 while (value > vci->max
value > vci->maxDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
631 value -= 2 * vci->max;
never executed: value -= 2 * vci->max;
0
632 value = qAbs(value);-
633 majorAxisIsY = value < vci->max - value;-
634 }
never executed: end of block
else if (vci->label == atom(QXcbAtom::AbsMTPressure)
vci->label == ...AbsMTPressure)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
635 vci->label == atom(QXcbAtom::AbsPressure)
vci->label == ...::AbsPressure)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
636 touchPoint.pressure = valuatorNormalized(value, vci);-
637 }
never executed: end of block
0
638 }
never executed: end of block
0
639 }
never executed: end of block
0
640-
641 if (nx == -1.0
nx == -1.0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
642 x = touchPoint.area.center().x();-
643 nx = x / screen->geometry().width();-
644 }
never executed: end of block
0
645 if (ny == -1.0
ny == -1.0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
646 y = touchPoint.area.center().y();-
647 ny = y / screen->geometry().height();-
648 }
never executed: end of block
0
649 if (xiDeviceEvent->evtype != 20
xiDeviceEvent->evtype != 20Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
650 if (!dev->providesTouchOrientation
!dev->providesTouchOrientationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
651 if (w == 0.0
w == 0.0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
652 w = touchPoint.area.width();
never executed: w = touchPoint.area.width();
0
653 h = w;-
654 }
never executed: end of block
else {
0
655 if (w == 0.0
w == 0.0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
656 w = qMax(touchPoint.area.width(), touchPoint.area.height());
never executed: w = qMax(touchPoint.area.width(), touchPoint.area.height());
0
657 if (h == 0.0
h == 0.0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
658 h = qMin(touchPoint.area.width(), touchPoint.area.height());
never executed: h = qMin(touchPoint.area.width(), touchPoint.area.height());
0
659 if (majorAxisIsY
majorAxisIsYDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
660 qSwap(w, h);
never executed: qSwap(w, h);
0
661 }
never executed: end of block
0
662 }-
663-
664 switch (xiDeviceEvent->evtype) {-
665 case
never executed: case 18:
18:
never executed: case 18:
0
666 if (firstTouch
firstTouchDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
667 dev->firstPressedPosition = QPointF(x, y);-
668 dev->firstPressedNormalPosition = QPointF(nx, ny);-
669 }
never executed: end of block
0
670 dev->pointPressedPosition.insert(touchPoint.id, QPointF(x, y));-
671-
672-
673-
674 if (m_xiGrab
m_xiGrabDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
675 XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,-
676 xiDeviceEvent->detail, xiDeviceEvent->event, 6);-
677-
678 }
never executed: end of block
0
679 break;
never executed: break;
0
680 case
never executed: case 19:
19:
never executed: case 19:
0
681 if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad
dev->qtTouchDe...vice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
&& dev->pointPressedPosition.value(touchPoint.id) == QPointF(x, y)
dev->pointPres... QPointF(x, y)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
682 qreal dx = (nx - dev->firstPressedNormalPosition.x()) *-
683 dev->size.width() * screen->geometry().width() / screen->physicalSize().width();-
684 qreal dy = (ny - dev->firstPressedNormalPosition.y()) *-
685 dev->size.height() * screen->geometry().height() / screen->physicalSize().height();-
686 x = dev->firstPressedPosition.x() + dx;-
687 y = dev->firstPressedPosition.y() + dy;-
688 touchPoint.state = Qt::TouchPointMoved;-
689 }
never executed: end of block
else if (touchPoint.area.center() != QPoint(x, y)
touchPoint.are...= QPoint(x, y)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
690 touchPoint.state = Qt::TouchPointMoved;-
691 dev->pointPressedPosition[touchPoint.id] = QPointF(x, y);-
692 }
never executed: end of block
0
693 break;
never executed: break;
0
694 case
never executed: case 20:
20:
never executed: case 20:
0
695 touchPoint.state = Qt::TouchPointReleased;-
696 if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad
dev->qtTouchDe...vice::TouchPadDescription
TRUEnever evaluated
FALSEnever evaluated
&& dev->pointPressedPosition.value(touchPoint.id) == QPointF(x, y)
dev->pointPres... QPointF(x, y)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
697 qreal dx = (nx - dev->firstPressedNormalPosition.x()) *-
698 dev->size.width() * screen->geometry().width() / screen->physicalSize().width();-
699 qreal dy = (ny - dev->firstPressedNormalPosition.y()) *-
700 dev->size.width() * screen->geometry().width() / screen->physicalSize().width();-
701 x = dev->firstPressedPosition.x() + dx;-
702 y = dev->firstPressedPosition.y() + dy;-
703 }
never executed: end of block
0
704 dev->pointPressedPosition.remove(touchPoint.id);-
705 }
never executed: end of block
0
706 touchPoint.area = QRectF(x - w/2, y - h/2, w, h);-
707 touchPoint.normalPosition = QPointF(nx, ny);-
708-
709 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled()), false)
__builtin_expe...led()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
710 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 752, __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug() << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition <<
never executed: QMessageLogger(__FILE__, 752, __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug() << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition << " area " << touchPoint.area << " pressure " << touchPoint.pressure;
0
711 " area " << touchPoint.area << " pressure " << touchPoint.pressure;
never executed: QMessageLogger(__FILE__, 752, __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug() << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition << " area " << touchPoint.area << " pressure " << touchPoint.pressure;
0
712 QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiDeviceEvent->time, dev->qtTouchDevice, dev->touchPoints.values());-
713 if (touchPoint.state == Qt::TouchPointReleased
touchPoint.sta...hPointReleasedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
714-
715 dev->touchPoints.remove(touchPoint.id);
never executed: dev->touchPoints.remove(touchPoint.id);
0
716 else-
717-
718-
719 touchPoint.state = Qt::TouchPointStationary;
never executed: touchPoint.state = Qt::TouchPointStationary;
0
720}-
721-
722bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)-
723{-
724 if (grab
grabDescription
TRUEevaluated 198 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
FALSEevaluated 169 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
&& !canGrab()
!canGrab()Description
TRUEnever evaluated
FALSEevaluated 198 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
)
0-198
725 return
never executed: return false;
false;
never executed: return false;
0
726-
727 int num_devices = 0;-
728 Display *xDisplay = static_cast<Display *>(xlib_display());-
729 XIDeviceInfo *info = XIQueryDevice(xDisplay, 1, &num_devices);-
730 if (!info
!infoDescription
TRUEnever evaluated
FALSEevaluated 367 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
)
0-367
731 return
never executed: return false;
false;
never executed: return false;
0
732-
733 XIEventMask evmask;-
734 unsigned char mask[(((26) >> 3) + 1)];-
735 evmask.mask = mask;-
736 evmask.mask_len = sizeof(mask);-
737 memset(mask, 0, sizeof(mask));-
738 evmask.deviceid = 1;-
739-
740 (((unsigned char*)(mask))[(4)>>3] |= (1 << ((4) & 7)));-
741 (((unsigned char*)(mask))[(5)>>3] |= (1 << ((5) & 7)));-
742 (((unsigned char*)(mask))[(6)>>3] |= (1 << ((6) & 7)));-
743 (((unsigned char*)(mask))[(7)>>3] |= (1 << ((7) & 7)));-
744 (((unsigned char*)(mask))[(8)>>3] |= (1 << ((8) & 7)));-
745 (((unsigned char*)(mask))[(18)>>3] |= (1 << ((18) & 7)));-
746 (((unsigned char*)(mask))[(19)>>3] |= (1 << ((19) & 7)));-
747 (((unsigned char*)(mask))[(20)>>3] |= (1 << ((20) & 7)));-
748-
749 bool grabbed = true;-
750 for (int i = 0; i < num_devices
i < num_devicesDescription
TRUEevaluated 734 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
FALSEevaluated 367 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
; i++) {
367-734
751 int id = info[i].deviceid, n = 0;-
752 XIDeviceInfo *deviceInfo = XIQueryDevice(xDisplay, id, &n);-
753 if (deviceInfo
deviceInfoDescription
TRUEevaluated 734 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
FALSEnever evaluated
) {
0-734
754 const bool grabbable = deviceInfo->use != 2;-
755 XIFreeDeviceInfo(deviceInfo);-
756 if (!grabbable
!grabbableDescription
TRUEevaluated 367 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
FALSEevaluated 367 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
)
367
757 continue;
executed 367 times by 21 tests: continue;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
367
758 }
executed 367 times by 21 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
367
759 if (!grab
!grabDescription
TRUEevaluated 169 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
FALSEevaluated 198 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
) {
169-198
760 int result = XIUngrabDevice(xDisplay, id, 0L);-
761 if (result != 0
result != 0Description
TRUEnever evaluated
FALSEevaluated 169 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
) {
0-169
762 grabbed = false;-
763 for (bool qt_category_enabled = lcQpaXInput().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 805, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to ungrab events for device %d (result %d)", id, result);
never executed: QMessageLogger(__FILE__, 805, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to ungrab events for device %d (result %d)", id, result);
0
764 }
never executed: end of block
0
765 }
executed 169 times by 21 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
else {
169
766 int result = XIGrabDevice(xDisplay, id, w, 0L, 0L, 1,-
767 1, 0, &evmask);-
768 if (result != 0
result != 0Description
TRUEnever evaluated
FALSEevaluated 198 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
) {
0-198
769 grabbed = false;-
770 for (bool qt_category_enabled = lcQpaXInput().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 812, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to grab events for device %d on window %x (result %d)", id, w, result);
never executed: QMessageLogger(__FILE__, 812, __PRETTY_FUNCTION__, lcQpaXInput().categoryName()).debug("XInput 2.2: failed to grab events for device %d on window %x (result %d)", id, w, result);
0
771 }
never executed: end of block
0
772 }
executed 198 times by 21 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
198
773 }-
774-
775 XIFreeDeviceInfo(info);-
776-
777 m_xiGrab = grabbed;-
778-
779 return
executed 367 times by 21 tests: return grabbed;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
grabbed;
executed 367 times by 21 tests: return grabbed;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QToolTip
  • tst_QWidget
  • tst_QWidgetAction
367
780}-
781-
782-
783void QXcbConnection::xi2HandleHierachyEvent(void *event)-
784{-
785 xXIHierarchyEvent *xiEvent = reinterpret_cast<xXIHierarchyEvent *>(event);-
786-
787 if (!(xiEvent->flags & ((1 << 3) | (1 << 2)))
!(xiEvent->fla...) | (1 << 2)))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
788 return;
never executed: return;
0
789 xi2SetupDevices();-
790-
791 for (auto it = m_mapper.cbegin(), end = m_mapper.cend(); it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
792 xi2Select(it.key());
never executed: xi2Select(it.key());
0
793}
never executed: end of block
0
794-
795void QXcbConnection::xi2HandleDeviceChangedEvent(void *event)-
796{-
797 xXIDeviceChangedEvent *xiEvent = reinterpret_cast<xXIDeviceChangedEvent *>(event);-
798-
799-
800 if (xiEvent->reason != 1
xiEvent->reason != 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
801 return;
never executed: return;
0
802-
803-
804-
805-
806-
807-
808-
809 QHash<int, ScrollingDevice>::iterator device = m_scrollingDevices.find(xiEvent->sourceid);-
810 if (device == m_scrollingDevices.end()
device == m_sc...gDevices.end()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
811 return;
never executed: return;
0
812-
813 int nrDevices = 0;-
814 XIDeviceInfo* xiDeviceInfo = XIQueryDevice(static_cast<Display *>(m_xlib_display), xiEvent->sourceid, &nrDevices);-
815 if (nrDevices <= 0
nrDevices <= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
816 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 858, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("scrolling device %d no longer present", xiEvent->sourceid);
never executed: QMessageLogger(__FILE__, 858, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("scrolling device %d no longer present", xiEvent->sourceid);
0
817 return;
never executed: return;
0
818 }-
819 updateScrollingDevice(*device, xiDeviceInfo->num_classes, xiDeviceInfo->classes);-
820 XIFreeDeviceInfo(xiDeviceInfo);-
821-
822}
never executed: end of block
0
823-
824void QXcbConnection::updateScrollingDevice(ScrollingDevice &scrollingDevice, int num_classes, void *classInfo)-
825{-
826-
827 XIAnyClassInfo **classes = reinterpret_cast<XIAnyClassInfo**>(classInfo);-
828 QPointF lastScrollPosition;-
829 if (lcQpaXInput().isDebugEnabled()
lcQpaXInput().isDebugEnabled()Description
TRUEnever evaluated
FALSEevaluated 2852 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-2852
830 lastScrollPosition = scrollingDevice.lastScrollPosition;
never executed: lastScrollPosition = scrollingDevice.lastScrollPosition;
0
831 for (int c = 0; c < num_classes
c < num_classesDescription
TRUEevaluated 14260 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 2852 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
; ++c) {
2852-14260
832 if (classes[c]->type == 2
classes[c]->type == 2Description
TRUEevaluated 8556 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 5704 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
) {
5704-8556
833 XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(classes[c]);-
834 const int valuatorAtom = qatom(vci->label);-
835 if (valuatorAtom == QXcbAtom::RelHorizScroll
valuatorAtom =...RelHorizScrollDescription
TRUEnever evaluated
FALSEevaluated 8556 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
|| valuatorAtom == QXcbAtom::RelHorizWheel
valuatorAtom =...:RelHorizWheelDescription
TRUEevaluated 1426 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 7130 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-8556
836 scrollingDevice.lastScrollPosition.setX(vci->value);
executed 1426 times by 70 tests: scrollingDevice.lastScrollPosition.setX(vci->value);
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
1426
837 else if (valuatorAtom == QXcbAtom::RelVertScroll
valuatorAtom =...:RelVertScrollDescription
TRUEnever evaluated
FALSEevaluated 7130 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
|| valuatorAtom == QXcbAtom::RelVertWheel
valuatorAtom =...::RelVertWheelDescription
TRUEevaluated 1426 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 5704 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-7130
838 scrollingDevice.lastScrollPosition.setY(vci->value);
executed 1426 times by 70 tests: scrollingDevice.lastScrollPosition.setY(vci->value);
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
1426
839 }
executed 8556 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
8556
840 }
executed 14260 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
14260
841 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled() && lastScrollPosition != scrollingDevice.lastScrollPosition), false)
__builtin_expe...ition), false)Description
TRUEnever evaluated
FALSEevaluated 2852 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
)
0-2852
842 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
8430
8440
845 __FILE__
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
846 ,
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
8470
8480
849 887
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
850 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y())
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
8510
8520
853 ;
never executed: QMessageLogger( __FILE__ , 887 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("scrolling device %d moved from (%f, %f) to (%f, %f)", scrollingDevice.deviceId, lastScrollPosition.x(), lastScrollPosition.y(), scrollingDevice.lastScrollPosition.x(), scrollingDevice.lastScrollPosition.y()) ;
0
854-
855-
856-
857-
858-
859}
executed 2852 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
2852
860-
861-
862void QXcbConnection::handleEnterEvent()-
863{-
864 QHash<int, ScrollingDevice>::iterator it = m_scrollingDevices.begin();-
865 const QHash<int, ScrollingDevice>::iterator end = m_scrollingDevices.end();-
866 while (it != end
it != endDescription
TRUEevaluated 2852 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
FALSEevaluated 713 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
) {
713-2852
867 ScrollingDevice& scrollingDevice = it.value();-
868 int nrDevices = 0;-
869 XIDeviceInfo* xiDeviceInfo = XIQueryDevice(static_cast<Display *>(m_xlib_display), scrollingDevice.deviceId, &nrDevices);-
870 if (nrDevices <= 0
nrDevices <= 0Description
TRUEnever evaluated
FALSEevaluated 2852 times by 70 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
) {
0-2852
871 for (bool qt_category_enabled = lcQpaXInputDevices().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 905, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("scrolling device %d no longer present", scrollingDevice.deviceId);
never executed: QMessageLogger(__FILE__, 905, __PRETTY_FUNCTION__, lcQpaXInputDevices().categoryName()).debug("scrolling device %d no longer present", scrollingDevice.deviceId);
0
872 it = m_scrollingDevices.erase(it);-
873 continue;
never executed: continue;
0
874 }-
875 updateScrollingDevice(scrollingDevice, xiDeviceInfo->num_classes, xiDeviceInfo->classes);-
876 XIFreeDeviceInfo(xiDeviceInfo);-
877 ++it;-
878 }
executed 2852 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
2852
879}
executed 713 times by 70 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGestureRecognizer
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsSceneIndex
  • ...
713
880-
881-
882void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollingDevice)-
883{-
884-
885 xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);-
886-
887 if (xiEvent->evtype == 6
xiEvent->evtype == 6Description
TRUEnever evaluated
FALSEnever evaluated
&& scrollingDevice.orientations
scrollingDevice.orientationsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
888 xXIDeviceEvent* xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);-
889 if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event)
QXcbWindow *pl...eEvent->event)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
890 QPoint rawDelta;-
891 QPoint angleDelta;-
892 double value;-
893 if (scrollingDevice.orientations & Qt::Vertical
scrollingDevic...& Qt::VerticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
894 if (xi2GetValuatorValueIfSet(xiDeviceEvent, scrollingDevice.verticalIndex, &value)
xi2GetValuator...Index, &value)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
895 double delta = scrollingDevice.lastScrollPosition.y() - value;-
896 scrollingDevice.lastScrollPosition.setY(value);-
897 angleDelta.setY((delta / scrollingDevice.verticalIncrement) * 120);-
898-
899 if (scrollingDevice.verticalIncrement > 1
scrollingDevic...lIncrement > 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
900 rawDelta.setY(delta);
never executed: rawDelta.setY(delta);
0
901 else if (scrollingDevice.verticalIncrement < -1
scrollingDevic...Increment < -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
902 rawDelta.setY(-delta);
never executed: rawDelta.setY(-delta);
0
903 }
never executed: end of block
0
904 }
never executed: end of block
0
905 if (scrollingDevice.orientations & Qt::Horizontal
scrollingDevic...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
906 if (xi2GetValuatorValueIfSet(xiDeviceEvent, scrollingDevice.horizontalIndex, &value)
xi2GetValuator...Index, &value)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
907 double delta = scrollingDevice.lastScrollPosition.x() - value;-
908 scrollingDevice.lastScrollPosition.setX(value);-
909 angleDelta.setX((delta / scrollingDevice.horizontalIncrement) * 120);-
910-
911 if (scrollingDevice.horizontalIncrement > 1
scrollingDevic...lIncrement > 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
912 rawDelta.setX(delta);
never executed: rawDelta.setX(delta);
0
913 else if (scrollingDevice.horizontalIncrement < -1
scrollingDevic...Increment < -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
914 rawDelta.setX(-delta);
never executed: rawDelta.setX(-delta);
0
915 }
never executed: end of block
0
916 }
never executed: end of block
0
917 if (!angleDelta.isNull()
!angleDelta.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
918 QPoint local(fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y));-
919 QPoint global(fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y));-
920 Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);-
921 if (modifiers & Qt::AltModifier
modifiers & Qt::AltModifierDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
922 std::swap(angleDelta.rx(), angleDelta.ry());-
923 std::swap(rawDelta.rx(), rawDelta.ry());-
924 }
never executed: end of block
0
925 QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, rawDelta, angleDelta, modifiers);-
926 }
never executed: end of block
0
927 }
never executed: end of block
0
928 }
never executed: end of block
else if (xiEvent->evtype == 5
xiEvent->evtype == 5Description
TRUEnever evaluated
FALSEnever evaluated
&& scrollingDevice.legacyOrientations
scrollingDevic...cyOrientationsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
929 xXIDeviceEvent* xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);-
930 if (QXcbWindow *platformWindow = platformWindowFromId(xiDeviceEvent->event)
QXcbWindow *pl...eEvent->event)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
931 QPoint angleDelta;-
932 if (scrollingDevice.legacyOrientations & Qt::Vertical
scrollingDevic...& Qt::VerticalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
933 if (xiDeviceEvent->detail == 4
xiDeviceEvent->detail == 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
934 angleDelta.setY(120);
never executed: angleDelta.setY(120);
0
935 else if (xiDeviceEvent->detail == 5
xiDeviceEvent->detail == 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
936 angleDelta.setY(-120);
never executed: angleDelta.setY(-120);
0
937 }
never executed: end of block
0
938 if (scrollingDevice.legacyOrientations & Qt::Horizontal
scrollingDevic...Qt::HorizontalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
939 if (xiDeviceEvent->detail == 6
xiDeviceEvent->detail == 6Description
TRUEnever evaluated
FALSEnever evaluated
)
0
940 angleDelta.setX(120);
never executed: angleDelta.setX(120);
0
941 else if (xiDeviceEvent->detail == 7
xiDeviceEvent->detail == 7Description
TRUEnever evaluated
FALSEnever evaluated
)
0
942 angleDelta.setX(-120);
never executed: angleDelta.setX(-120);
0
943 }
never executed: end of block
0
944 if (!angleDelta.isNull()
!angleDelta.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
945 QPoint local(fixed1616ToReal(xiDeviceEvent->event_x), fixed1616ToReal(xiDeviceEvent->event_y));-
946 QPoint global(fixed1616ToReal(xiDeviceEvent->root_x), fixed1616ToReal(xiDeviceEvent->root_y));-
947 Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);-
948 if (modifiers & Qt::AltModifier
modifiers & Qt::AltModifierDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
949 std::swap(angleDelta.rx(), angleDelta.ry());
never executed: std::swap(angleDelta.rx(), angleDelta.ry());
0
950 QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, QPoint(), angleDelta, modifiers);-
951 }
never executed: end of block
0
952 }
never executed: end of block
0
953 }
never executed: end of block
0
954-
955-
956-
957-
958}
never executed: end of block
0
959-
960Qt::MouseButton QXcbConnection::xiToQtMouseButton(uint32_t b)-
961{-
962 switch (b) {-
963 case
never executed: case 1:
1:
never executed: case 1:
return
never executed: return Qt::LeftButton;
Qt::LeftButton;
never executed: return Qt::LeftButton;
0
964 case
never executed: case 2:
2:
never executed: case 2:
return
never executed: return Qt::MiddleButton;
Qt::MiddleButton;
never executed: return Qt::MiddleButton;
0
965 case
never executed: case 3:
3:
never executed: case 3:
return
never executed: return Qt::RightButton;
Qt::RightButton;
never executed: return Qt::RightButton;
0
966-
967 default
executed 453 times by 17 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
:
executed 453 times by 17 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
break;
executed 453 times by 17 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
453
968 }-
969 if (b >= 8
b >= 8Description
TRUEnever evaluated
FALSEevaluated 453 times by 17 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
&& b <= Qt::MaxMouseButton
b <= Qt::MaxMouseButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-453
970 return
never executed: return static_cast<Qt::MouseButton>(Qt::BackButton << (b - 8));
static_cast<Qt::MouseButton>(Qt::BackButton << (b - 8));
never executed: return static_cast<Qt::MouseButton>(Qt::BackButton << (b - 8));
0
971 return
executed 453 times by 17 tests: return Qt::NoButton;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
Qt::NoButton;
executed 453 times by 17 tests: return Qt::NoButton;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
453
972}-
973-
974static QTabletEvent::TabletDevice toolIdToTabletDevice(quint32 toolId) {-
975-
976 switch (toolId) {-
977 case
never executed: case 0xd12:
0xd12:
never executed: case 0xd12:
0
978 case
never executed: case 0x912:
0x912:
never executed: case 0x912:
0
979 case
never executed: case 0x112:
0x112:
never executed: case 0x112:
0
980 case
never executed: case 0x913:
0x913:
never executed: case 0x913:
0
981 case
never executed: case 0x91b:
0x91b:
never executed: case 0x91b:
0
982 case
never executed: case 0x902:
0x902:
never executed: case 0x902:
0
983 case
never executed: case 0x90a:
0x90a:
never executed: case 0x90a:
0
984 case
never executed: case 0x100902:
0x100902:
never executed: case 0x100902:
0
985 case
never executed: case 0x10090a:
0x10090a:
never executed: case 0x10090a:
0
986 return
never executed: return QTabletEvent::Airbrush;
QTabletEvent::Airbrush;
never executed: return QTabletEvent::Airbrush;
0
987 case
never executed: case 0x007:
0x007:
never executed: case 0x007:
0
988 case
never executed: case 0x09c:
0x09c:
never executed: case 0x09c:
0
989 case
never executed: case 0x094:
0x094:
never executed: case 0x094:
0
990 return
never executed: return QTabletEvent::FourDMouse;
QTabletEvent::FourDMouse;
never executed: return QTabletEvent::FourDMouse;
0
991 case
never executed: case 0x017:
0x017:
never executed: case 0x017:
0
992 case
never executed: case 0x806:
0x806:
never executed: case 0x806:
0
993 case
never executed: case 0x096:
0x096:
never executed: case 0x096:
0
994 case
never executed: case 0x097:
0x097:
never executed: case 0x097:
0
995 case
never executed: case 0x006:
0x006:
never executed: case 0x006:
0
996 return
never executed: return QTabletEvent::Puck;
QTabletEvent::Puck;
never executed: return QTabletEvent::Puck;
0
997 case
never executed: case 0x885:
0x885:
never executed: case 0x885:
0
998 case
never executed: case 0x100804:
0x100804:
never executed: case 0x100804:
0
999 case
never executed: case 0x10080c:
0x10080c:
never executed: case 0x10080c:
0
1000 return
never executed: return QTabletEvent::RotationStylus;
QTabletEvent::RotationStylus;
never executed: return QTabletEvent::RotationStylus;
0
1001 case
never executed: case 0:
0:
never executed: case 0:
0
1002 return
never executed: return QTabletEvent::NoDevice;
QTabletEvent::NoDevice;
never executed: return QTabletEvent::NoDevice;
0
1003 }-
1004 return
never executed: return QTabletEvent::Stylus;
QTabletEvent::Stylus;
never executed: return QTabletEvent::Stylus;
0
1005}-
1006-
1007-
1008bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletData)-
1009{-
1010 bool handled = true;-
1011 Display *xDisplay = static_cast<Display *>(m_xlib_display);-
1012 const xXIGenericDeviceEvent *xiEvent = static_cast<const xXIGenericDeviceEvent *>(event);-
1013 const xXIDeviceEvent *xiDeviceEvent = reinterpret_cast<const xXIDeviceEvent *>(xiEvent);-
1014-
1015 switch (xiEvent->evtype) {-
1016 case
never executed: case 4:
4:
never executed: case 4:
{
0
1017 Qt::MouseButton b = xiToQtMouseButton(xiDeviceEvent->detail);-
1018 tabletData->buttons |= b;-
1019 xi2ReportTabletEvent(xiEvent, tabletData);-
1020 break;
never executed: break;
0
1021 }-
1022 case
never executed: case 5:
5:
never executed: case 5:
{
0
1023 Qt::MouseButton b = xiToQtMouseButton(xiDeviceEvent->detail);-
1024 tabletData->buttons ^= b;-
1025 xi2ReportTabletEvent(xiEvent, tabletData);-
1026 break;
never executed: break;
0
1027 }-
1028 case
never executed: case 6:
6:
never executed: case 6:
0
1029-
1030-
1031 if (tabletData->buttons != Qt::NoButton
tabletData->bu...= Qt::NoButtonDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1032 xi2ReportTabletEvent(xiEvent, tabletData);
never executed: xi2ReportTabletEvent(xiEvent, tabletData);
0
1033 break;
never executed: break;
0
1034 case
never executed: case 12:
12:
never executed: case 12:
{
0
1035-
1036-
1037 const xXIPropertyEvent *ev = reinterpret_cast<const xXIPropertyEvent *>(event);-
1038 if (ev->what == 2
ev->what == 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1039 if (ev->property == atom(QXcbAtom::WacomSerialIDs)
ev->property =...acomSerialIDs)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1040 enum WacomSerialIndex {-
1041 _WACSER_USB_ID = 0,-
1042 _WACSER_LAST_TOOL_SERIAL,-
1043 _WACSER_LAST_TOOL_ID,-
1044 _WACSER_TOOL_SERIAL,-
1045 _WACSER_TOOL_ID,-
1046 _WACSER_COUNT-
1047 };-
1048 Atom propType;-
1049 int propFormat;-
1050 unsigned long numItems, bytesAfter;-
1051 unsigned char *data;-
1052 if (XIGetProperty(xDisplay, tabletData->deviceId, ev->property, 0, 100,
XIGetProperty(...r, &data) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1053 0, 0L, &propType, &propFormat,
XIGetProperty(...r, &data) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1054 &numItems, &bytesAfter, &data) == 0
XIGetProperty(...r, &data) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1055 if (propType == atom(QXcbAtom::INTEGER)
propType == at...Atom::INTEGER)Description
TRUEnever evaluated
FALSEnever evaluated
&& propFormat == 32
propFormat == 32Description
TRUEnever evaluated
FALSEnever evaluated
&& numItems == _WACSER_COUNT
numItems == _WACSER_COUNTDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1056 quint32 *ptr = reinterpret_cast<quint32 *>(data);-
1057 quint32 tool = ptr[_WACSER_TOOL_ID];-
1058-
1059-
1060 if (!tool
!toolDescription
TRUEnever evaluated
FALSEnever evaluated
&& ptr[_WACSER_TOOL_SERIAL]
ptr[_WACSER_TOOL_SERIAL]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1061 tool = ptr[_WACSER_TOOL_SERIAL];
never executed: tool = ptr[_WACSER_TOOL_SERIAL];
0
1062-
1063-
1064 if (tool
toolDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1065 tabletData->inProximity = true;-
1066 tabletData->tool = toolIdToTabletDevice(tool);-
1067 tabletData->serialId = qint64(ptr[_WACSER_USB_ID]) << 32 | qint64(ptr[_WACSER_TOOL_SERIAL]);-
1068 QWindowSystemInterface::handleTabletEnterProximityEvent(ev->time,-
1069 tabletData->tool, tabletData->pointerType, tabletData->serialId);-
1070 }
never executed: end of block
else {
0
1071 tabletData->inProximity = false;-
1072 tabletData->tool = toolIdToTabletDevice(ptr[_WACSER_LAST_TOOL_ID]);-
1073-
1074-
1075 if (!tabletData->tool
!tabletData->toolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1076 tabletData->tool = toolIdToTabletDevice(ptr[_WACSER_LAST_TOOL_SERIAL]);
never executed: tabletData->tool = toolIdToTabletDevice(ptr[_WACSER_LAST_TOOL_SERIAL]);
0
1077 tabletData->serialId = qint64(ptr[_WACSER_USB_ID]) << 32 | qint64(ptr[_WACSER_LAST_TOOL_SERIAL]);-
1078 QWindowSystemInterface::handleTabletLeaveProximityEvent(ev->time,-
1079 tabletData->tool, tabletData->pointerType, tabletData->serialId);-
1080 }
never executed: end of block
0
1081-
1082-
1083 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled()), false)
__builtin_expe...led()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1084 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
10850
1086 __FILE__
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
1087 ,
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
10880
1089 1120
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
1090 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool)
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
10910
1092 ;
never executed: QMessageLogger( __FILE__ , 1120 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 proximity change on tablet %d (USB %x): last tool: %x id %x current tool: %x id %x TabletDevice %d", tabletData->deviceId, ptr[_WACSER_USB_ID], ptr[_WACSER_LAST_TOOL_SERIAL], ptr[_WACSER_LAST_TOOL_ID], ptr[_WACSER_TOOL_SERIAL], ptr[_WACSER_TOOL_ID], tabletData->tool) ;
0
1093 }
never executed: end of block
0
1094 XFree(data);-
1095 }
never executed: end of block
0
1096 }
never executed: end of block
0
1097 }
never executed: end of block
0
1098 break;
never executed: break;
0
1099 }-
1100 default
never executed: default:
:
never executed: default:
0
1101 handled = false;-
1102 break;
never executed: break;
0
1103 }-
1104-
1105 return
never executed: return handled;
handled;
never executed: return handled;
0
1106}-
1107-
1108void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletData)-
1109{-
1110 const xXIDeviceEvent *ev = reinterpret_cast<const xXIDeviceEvent *>(event);-
1111 QXcbWindow *xcbWindow = platformWindowFromId(ev->event);-
1112 if (!xcbWindow
!xcbWindowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1113 return;
never executed: return;
0
1114 QWindow *window = xcbWindow->window();-
1115 const double scale = 65536.0;-
1116 QPointF local(ev->event_x / scale, ev->event_y / scale);-
1117 QPointF global(ev->root_x / scale, ev->root_y / scale);-
1118 double pressure = 0, rotation = 0, tangentialPressure = 0;-
1119 int xTilt = 0, yTilt = 0;-
1120-
1121 for (QHash<int, TabletData::ValuatorClassInfo>::iterator it = tabletData->valuatorInfo.begin(),-
1122 ite = tabletData->valuatorInfo.end(); it != ite
it != iteDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it) {
0
1123 int valuator = it.key();-
1124 TabletData::ValuatorClassInfo &classInfo(it.value());-
1125 xi2GetValuatorValueIfSet(event, classInfo.number, &classInfo.curVal);-
1126 double normalizedValue = (classInfo.curVal - classInfo.minVal) / (classInfo.maxVal - classInfo.minVal);-
1127 switch (valuator) {-
1128 case
never executed: case QXcbAtom::AbsPressure:
QXcbAtom::AbsPressure:
never executed: case QXcbAtom::AbsPressure:
0
1129 pressure = normalizedValue;-
1130 break;
never executed: break;
0
1131 case
never executed: case QXcbAtom::AbsTiltX:
QXcbAtom::AbsTiltX:
never executed: case QXcbAtom::AbsTiltX:
0
1132 xTilt = classInfo.curVal;-
1133 break;
never executed: break;
0
1134 case
never executed: case QXcbAtom::AbsTiltY:
QXcbAtom::AbsTiltY:
never executed: case QXcbAtom::AbsTiltY:
0
1135 yTilt = classInfo.curVal;-
1136 break;
never executed: break;
0
1137 case
never executed: case QXcbAtom::AbsWheel:
QXcbAtom::AbsWheel:
never executed: case QXcbAtom::AbsWheel:
0
1138 switch (tabletData->tool) {-
1139 case
never executed: case QTabletEvent::Airbrush:
QTabletEvent::Airbrush:
never executed: case QTabletEvent::Airbrush:
0
1140 tangentialPressure = normalizedValue * 2.0 - 1.0;-
1141 break;
never executed: break;
0
1142 case
never executed: case QTabletEvent::RotationStylus:
QTabletEvent::RotationStylus:
never executed: case QTabletEvent::RotationStylus:
0
1143 rotation = normalizedValue * 360.0 - 180.0;-
1144 break;
never executed: break;
0
1145 default
never executed: default:
:
never executed: default:
0
1146 break;
never executed: break;
0
1147 }-
1148 break;
never executed: break;
0
1149 default
never executed: default:
:
never executed: default:
0
1150 break;
never executed: break;
0
1151 }-
1152 }-
1153-
1154 if (__builtin_expect(!!(lcQpaXInputEvents().isDebugEnabled()), false)
__builtin_expe...led()), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1155 for (bool qt_category_enabled = lcQpaXInputEvents().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
11560
11570
11580
11590
1160 __FILE__
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
1161 ,
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
11620
11630
11640
11650
1166 1188
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
1167 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf", tabletData->deviceId, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation)
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
11680
11690
11700
11710
1172 ;
never executed: QMessageLogger( __FILE__ , 1188 , __PRETTY_FUNCTION__, lcQpaXInputEvents().categoryName()).debug("XI2 event on tablet %d with tool %d type %d seq %d detail %d time %d " "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotat...Id, tabletData->tool, ev->evtype, ev->sequenceNumber, ev->detail, ev->time, fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation) ;
0
1173-
1174 QWindowSystemInterface::handleTabletEvent(window, ev->time, local, global,-
1175 tabletData->tool, tabletData->pointerType,-
1176 tabletData->buttons, pressure,-
1177 xTilt, yTilt, tangentialPressure,-
1178 rotation, 0, tabletData->serialId);-
1179}
never executed: end of block
0
1180-
1181QXcbConnection::TabletData *QXcbConnection::tabletDataForDevice(int id)-
1182{-
1183 for (int i = 0; i < m_tabletData.count()
i < m_tabletData.count()Description
TRUEnever evaluated
FALSEevaluated 944 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
; ++i) {
0-944
1184 if (m_tabletData.at(i).deviceId == id
m_tabletData.a...deviceId == idDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1185 return
never executed: return &m_tabletData[i];
&m_tabletData[i];
never executed: return &m_tabletData[i];
0
1186 }
never executed: end of block
0
1187 return
executed 944 times by 18 tests: return nullptr;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
nullptr;
executed 944 times by 18 tests: return nullptr;
Executed by:
  • tst_QAbstractItemView
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QItemView
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QWidget
  • tst_QWindow
944
1188}-
Switch to Source codePreprocessed file

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