aboutsummaryrefslogtreecommitdiff
path: root/package/qt5/qt5base/0006-evdevtouch-fix-input_event-time-related-compile.patch
blob: a24ac4f1843df6c006e72614926a4df4162575cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From c9adb999cdb21f991f2c70b1d3b40e16d4fed2c0 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Mon, 4 May 2020 23:19:25 +0200
Subject: [PATCH] evdevtouch: fix input_event time related compile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes:

  evdevtouch/qevdevtouchhandler.cpp: In member function ‘void QEvdevTouchScreenData::processInputEvent(input_event*)’:
  evdevtouch/qevdevtouchhandler.cpp:579:29: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’?
           m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
                               ^~~~
                               type
  evdevtouch/qevdevtouchhandler.cpp:579:49: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’?
           m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
                                                   ^~~~
                                                   type

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Upstream: https://github.com/qt/qtbase/commit/71fb4d081c7f3675939ac8c62063631a18175fd1
---
 .../input/evdevtouch/qevdevtouchhandler.cpp            | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index c51db59e..94a9b103 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -58,6 +58,14 @@
 #include <linux/input.h>
 #endif
 
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#endif
+
+#ifndef input_event_usec
+#define input_event_usec time.tv_usec
+#endif
+
 #include <math.h>
 
 #if QT_CONFIG(mtdev)
@@ -576,7 +584,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
 
         // update timestamps
         m_lastTimeStamp = m_timeStamp;
-        m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
+        m_timeStamp = data->input_event_sec + data->input_event_usec / 1000000.0;
 
         m_lastTouchPoints = m_touchPoints;
         m_touchPoints.clear();
-- 
2.26.2