qevdevtablethandler.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/input/evdevtablet/qevdevtablethandler.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5const QLoggingCategory &qLcEvdevTablet() { static const QLoggingCategory category("qt.qpa.input"); return
never executed: return category;
category;
never executed: return category;
}
0
6-
7class QEvdevTabletData-
8{-
9public:-
10 QEvdevTabletData(QEvdevTabletHandler *q_ptr);-
11-
12 void processInputEvent(input_event *ev);-
13 void report();-
14-
15 QEvdevTabletHandler *q;-
16 int lastEventType;-
17 QString devName;-
18 struct {-
19 int x, y, p, d;-
20 } minValues, maxValues;-
21 struct {-
22 int x, y, p, d;-
23 bool down, lastReportDown;-
24 int tool, lastReportTool;-
25 QPointF lastReportPos;-
26 } state;-
27};-
28-
29QEvdevTabletData::QEvdevTabletData(QEvdevTabletHandler *q_ptr)-
30 : q(q_ptr), lastEventType(0)-
31{-
32 memset(&minValues, 0, sizeof(minValues));-
33 memset(&maxValues, 0, sizeof(maxValues));-
34 memset(&state, 0, sizeof(state));-
35}
never executed: end of block
0
36-
37void QEvdevTabletData::processInputEvent(input_event *ev)-
38{-
39 if (ev->type == 0x03
ev->type == 0x03Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
40 switch (ev->code) {-
41 case
never executed: case 0x00:
0x00:
never executed: case 0x00:
0
42 state.x = ev->value;-
43 break;
never executed: break;
0
44 case
never executed: case 0x01:
0x01:
never executed: case 0x01:
0
45 state.y = ev->value;-
46 break;
never executed: break;
0
47 case
never executed: case 0x18:
0x18:
never executed: case 0x18:
0
48 state.p = ev->value;-
49 break;
never executed: break;
0
50 case
never executed: case 0x19:
0x19:
never executed: case 0x19:
0
51 state.d = ev->value;-
52 break;
never executed: break;
0
53 default
never executed: default:
:
never executed: default:
0
54 break;
never executed: break;
0
55 }-
56 } else if (ev->type == 0x01
ev->type == 0x01Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
57-
58-
59-
60-
61 switch (ev->code) {-
62 case
never executed: case 0x14a:
0x14a:
never executed: case 0x14a:
0
63 state.down = ev->value != 0;-
64 break;
never executed: break;
0
65 case
never executed: case 0x140:
0x140:
never executed: case 0x140:
0
66 state.tool = ev->value
ev->valueDescription
TRUEnever evaluated
FALSEnever evaluated
? QTabletEvent::Pen : 0;
0
67 break;
never executed: break;
0
68 case
never executed: case 0x141:
0x141:
never executed: case 0x141:
0
69 state.tool = ev->value
ev->valueDescription
TRUEnever evaluated
FALSEnever evaluated
? QTabletEvent::Eraser : 0;
0
70 break;
never executed: break;
0
71 default
never executed: default:
:
never executed: default:
0
72 break;
never executed: break;
0
73 }-
74 } else if (ev->type == 0x00
ev->type == 0x00Description
TRUEnever evaluated
FALSEnever evaluated
&& ev->code == 0
ev->code == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& lastEventType != ev->type
lastEventType != ev->typeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
75 report();-
76 }
never executed: end of block
0
77 lastEventType = ev->type;-
78}
never executed: end of block
0
79-
80void QEvdevTabletData::report()-
81{-
82 if (!state.lastReportTool
!state.lastReportToolDescription
TRUEnever evaluated
FALSEnever evaluated
&& state.tool
state.toolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
83 QWindowSystemInterface::handleTabletEnterProximityEvent(QTabletEvent::Stylus, state.tool, q->deviceId());
never executed: QWindowSystemInterface::handleTabletEnterProximityEvent(QTabletEvent::Stylus, state.tool, q->deviceId());
0
84-
85 qreal nx = (state.x - minValues.x) / qreal(maxValues.x - minValues.x);-
86 qreal ny = (state.y - minValues.y) / qreal(maxValues.y - minValues.y);-
87-
88 QRect winRect = QGuiApplication::primaryScreen()->geometry();-
89 QPointF globalPos(nx * winRect.width(), ny * winRect.height());-
90 int pointer = state.tool;-
91-
92 if (!state.down
!state.downDescription
TRUEnever evaluated
FALSEnever evaluated
&& state.lastReportDown
state.lastReportDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
93 globalPos = state.lastReportPos;-
94 pointer = state.lastReportTool;-
95 }
never executed: end of block
0
96-
97 int pressureRange = maxValues.p - minValues.p;-
98 qreal pressure = pressureRange
pressureRangeDescription
TRUEnever evaluated
FALSEnever evaluated
? (state.p - minValues.p) / qreal(pressureRange) : qreal(1);
0
99-
100 if (state.down
state.downDescription
TRUEnever evaluated
FALSEnever evaluated
|| state.lastReportDown
state.lastReportDownDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
101 QWindowSystemInterface::handleTabletEvent(0, state.down, QPointF(), globalPos,-
102 QTabletEvent::Stylus, pointer,-
103 pressure, 0, 0, 0, 0, 0, q->deviceId(), (static_cast<QGuiApplication *>(QCoreApplication::instance()))->keyboardModifiers());-
104 }
never executed: end of block
0
105-
106 if (state.lastReportTool
state.lastReportToolDescription
TRUEnever evaluated
FALSEnever evaluated
&& !state.tool
!state.toolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
107 QWindowSystemInterface::handleTabletLeaveProximityEvent(QTabletEvent::Stylus, state.tool, q->deviceId());
never executed: QWindowSystemInterface::handleTabletLeaveProximityEvent(QTabletEvent::Stylus, state.tool, q->deviceId());
0
108-
109 state.lastReportDown = state.down;-
110 state.lastReportTool = state.tool;-
111 state.lastReportPos = globalPos;-
112}
never executed: end of block
0
113-
114-
115QEvdevTabletHandler::QEvdevTabletHandler(const QString &device, const QString &spec, QObject *parent)-
116 : QObject(parent), m_fd(-1), m_device(device), m_notifier(0), d(0)-
117{-
118 (void)spec;-
119-
120 setObjectName(QLatin1String("Evdev Tablet Handler"));-
121-
122 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 169, __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: using %s", QString(device).toLocal8Bit().constData());
never executed: QMessageLogger(__FILE__, 169, __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: using %s", QString(device).toLocal8Bit().constData());
0
123-
124 m_fd = qt_safe_open(device.toLocal8Bit().constData(), 00 | 04000, 0);-
125 if (m_fd < 0
m_fd < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
126 qErrnoWarning((*__errno_location ()), "evdevtablet: Cannot open input device %s", QString(device).toLocal8Bit().constData());-
127 return;
never executed: return;
0
128 }-
129-
130 bool grabSuccess = !ioctl(m_fd, (((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))), (void *) 1);-
131 if (grabSuccess
grabSuccessDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
132 ioctl(m_fd, (((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))), (void *) 0);
never executed: ioctl(m_fd, (((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))), (void *) 0);
0
133 else-
134 QMessageLogger(__FILE__, 181, __PRETTY_FUNCTION__).warning("evdevtablet: %s: The device is grabbed by another process. No events will be read.", QString(device).toLocal8Bit().constData());
never executed: QMessageLogger(__FILE__, 181, __PRETTY_FUNCTION__).warning("evdevtablet: %s: The device is grabbed by another process. No events will be read.", QString(device).toLocal8Bit().constData());
0
135-
136 d = new QEvdevTabletData(this);-
137 if (!queryLimits()
!queryLimits()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
138 QMessageLogger(__FILE__, 185, __PRETTY_FUNCTION__).warning("evdevtablet: %s: Unset or invalid ABS limits. Behavior will be unspecified.", QString(device).toLocal8Bit().constData());
never executed: QMessageLogger(__FILE__, 185, __PRETTY_FUNCTION__).warning("evdevtablet: %s: Unset or invalid ABS limits. Behavior will be unspecified.", QString(device).toLocal8Bit().constData());
0
139-
140 m_notifier = new QSocketNotifier(m_fd, QSocketNotifier::Read, this);-
141 connect(m_notifier, &QSocketNotifier::activated, this, &QEvdevTabletHandler::readData);-
142}
never executed: end of block
0
143-
144QEvdevTabletHandler::~QEvdevTabletHandler()-
145{-
146 if (m_fd >= 0
m_fd >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
147 qt_safe_close(m_fd);
never executed: qt_safe_close(m_fd);
0
148-
149 delete d;-
150}
never executed: end of block
0
151-
152qint64 QEvdevTabletHandler::deviceId() const-
153{-
154 return
never executed: return m_fd;
m_fd;
never executed: return m_fd;
0
155}-
156-
157bool QEvdevTabletHandler::queryLimits()-
158{-
159 bool ok = true;-
160 input_absinfo absInfo;-
161 memset(&absInfo, 0, sizeof(input_absinfo));-
162 ok &= ioctl(m_fd, (((2U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x40 + (0x00))) << 0) | ((((sizeof(struct input_absinfo)))) << ((0 +8)+8))), &absInfo) >= 0;-
163 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
164 d->minValues.x = absInfo.minimum;-
165 d->maxValues.x = absInfo.maximum;-
166 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
167 __FILE__
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
168 ,
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
169 214
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
170 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x)
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
171 ;
never executed: QMessageLogger( __FILE__ , 214 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min X: %d max X: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.x, d->maxValues.x) ;
0
172 }
never executed: end of block
0
173 ok &= ioctl(m_fd, (((2U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x40 + (0x01))) << 0) | ((((sizeof(struct input_absinfo)))) << ((0 +8)+8))), &absInfo) >= 0;-
174 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
175 d->minValues.y = absInfo.minimum;-
176 d->maxValues.y = absInfo.maximum;-
177 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
178 __FILE__
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
179 ,
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
180 221
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
181 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y)
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
182 ;
never executed: QMessageLogger( __FILE__ , 221 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min Y: %d max Y: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.y, d->maxValues.y) ;
0
183 }
never executed: end of block
0
184 if (ioctl(m_fd, (((2U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x40 + (0x18))) << 0) | ((((sizeof(struct input_absinfo)))) << ((0 +8)+8))), &absInfo) >= 0
ioctl(m_fd, ((...&absInfo) >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
185 d->minValues.p = absInfo.minimum;-
186 d->maxValues.p = absInfo.maximum;-
187 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
188 __FILE__
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
189 ,
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
190 227
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
191 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p)
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
192 ;
never executed: QMessageLogger( __FILE__ , 227 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min pressure: %d max pressure: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.p, d->maxValues.p) ;
0
193 }
never executed: end of block
0
194 if (ioctl(m_fd, (((2U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x40 + (0x19))) << 0) | ((((sizeof(struct input_absinfo)))) << ((0 +8)+8))), &absInfo) >= 0
ioctl(m_fd, ((...&absInfo) >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
195 d->minValues.d = absInfo.minimum;-
196 d->maxValues.d = absInfo.maximum;-
197 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
198 __FILE__
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
199 ,
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
200 233
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
201 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d)
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
202 ;
never executed: QMessageLogger( __FILE__ , 233 , __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: min distance: %d max distance: %d", QString(m_device).toLocal8Bit().constData(), d->minValues.d, d->maxValues.d) ;
0
203 }
never executed: end of block
0
204 char name[128];-
205 if (ioctl(m_fd, (((2U) << (((0 +8)+8)+14)) | (('E') << (0 +8)) | ((0x06) << 0) | ((sizeof(name) - 1) << ((0 +8)+8))), name) >= 0
ioctl(m_fd, ((...)), name) >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
206 d->devName = QString::fromLocal8Bit(name);-
207 for (bool qt_category_enabled = qLcEvdevTablet().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 238, __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: device name: %s", QString(m_device).toLocal8Bit().constData(), name);
never executed: QMessageLogger(__FILE__, 238, __PRETTY_FUNCTION__, qLcEvdevTablet().categoryName()).debug("evdevtablet: %s: device name: %s", QString(m_device).toLocal8Bit().constData(), name);
0
208 }
never executed: end of block
0
209 return
never executed: return ok;
ok;
never executed: return ok;
0
210}-
211-
212void QEvdevTabletHandler::readData()-
213{-
214 static input_event buffer[32];-
215 int n = 0;-
216 for (; ;) {-
217 int result = qt_safe_read(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);-
218 if (!result
!resultDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
219 QMessageLogger(__FILE__, 250, __PRETTY_FUNCTION__).warning("evdevtablet: %s: Got EOF from input device", QString(m_device).toLocal8Bit().constData());-
220 return;
never executed: return;
0
221 } else if (result < 0
result < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
222 if ((*
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ()) != 4
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ()) != 11
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
223 qErrnoWarning((*__errno_location ()), "evdevtablet: %s: Could not read from input device", QString(m_device).toLocal8Bit().constData());-
224 if ((*
(*__errno_location ()) == 19Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ()) == 19
(*__errno_location ()) == 19Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
225 delete m_notifier;-
226 m_notifier = 0;-
227 qt_safe_close(m_fd);-
228 m_fd = -1;-
229 }
never executed: end of block
0
230 return;
never executed: return;
0
231 }-
232 }
never executed: end of block
else {
0
233 n += result;-
234 if (n % sizeof(input_event) == 0
n % sizeof(input_event) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
235 break;
never executed: break;
0
236 }
never executed: end of block
0
237 }-
238-
239 n /= sizeof(input_event);-
240-
241 for (int i = 0; i < n
i < nDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
242 d->processInputEvent(&buffer[i]);
never executed: d->processInputEvent(&buffer[i]);
0
243}
never executed: end of block
0
244-
245-
246QEvdevTabletHandlerThread::QEvdevTabletHandlerThread(const QString &device, const QString &spec, QObject *parent)-
247 : QDaemonThread(parent), m_device(device), m_spec(spec), m_handler(0)-
248{-
249 start();-
250}
never executed: end of block
0
251-
252QEvdevTabletHandlerThread::~QEvdevTabletHandlerThread()-
253{-
254 quit();-
255 wait();-
256}
never executed: end of block
0
257-
258void QEvdevTabletHandlerThread::run()-
259{-
260 m_handler = new QEvdevTabletHandler(m_device, m_spec);-
261 exec();-
262 delete m_handler;-
263 m_handler = 0;-
264}
never executed: end of block
0
265-
266-
267-
Switch to Source codePreprocessed file

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