diff options
-rw-r--r-- | recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch index 76b4671c..c027fb68 100644 --- a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch +++ b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e06ac2e26c8490a7b8702e9462d1f38244ac3f0f Mon Sep 17 00:00:00 2001 | 1 | From c200c1704501e5a74f72dedc3b3b76567d679e0d Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 25 Nov 2019 08:27:39 -0800 | 3 | Date: Mon, 25 Nov 2019 08:27:39 -0800 |
4 | Subject: [PATCH] input: Make use of timeval portable for 64bit time_t | 4 | Subject: [PATCH] input: Make use of timeval portable for 64bit time_t |
@@ -8,16 +8,13 @@ on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with | |||
8 | and keeps old input.h implementation functional as well. | 8 | and keeps old input.h implementation functional as well. |
9 | 9 | ||
10 | See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign | 10 | See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign |
11 | |||
12 | Upstream-Status: Submitted [https://codereview.qt-project.org/c/qt/qtbase/+/282610] | 11 | Upstream-Status: Submitted [https://codereview.qt-project.org/c/qt/qtbase/+/282610] |
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Change-Id: Ie4d66a5e7d83065f1a904a542c711431e1d20845 |
13 | |||
14 | --- | 14 | --- |
15 | .../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 10 +++++++++- | ||
16 | .../input/evdevtouch/qevdevtouchhandler.cpp | 2 +- | ||
17 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
18 | 15 | ||
19 | diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | 16 | diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp |
20 | index 666613f09d..0e3e0ea0de 100644 | 17 | index 3555763..e7dc57c 100644 |
21 | --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | 18 | --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp |
22 | +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | 19 | +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp |
23 | @@ -58,6 +58,11 @@ | 20 | @@ -58,6 +58,11 @@ |
@@ -32,8 +29,8 @@ index 666613f09d..0e3e0ea0de 100644 | |||
32 | QT_BEGIN_NAMESPACE | 29 | QT_BEGIN_NAMESPACE |
33 | 30 | ||
34 | Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input") | 31 | Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input") |
35 | @@ -149,7 +154,10 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state) | 32 | @@ -150,7 +155,10 @@ |
36 | qCDebug(qLcEvdevKey) << "switchLed" << led << state; | 33 | qCDebug(qLcEvdevKey, "switchLed %d %d", led, int(state)); |
37 | 34 | ||
38 | struct ::input_event led_ie; | 35 | struct ::input_event led_ie; |
39 | - ::gettimeofday(&led_ie.time, 0); | 36 | - ::gettimeofday(&led_ie.time, 0); |
@@ -45,10 +42,22 @@ index 666613f09d..0e3e0ea0de 100644 | |||
45 | led_ie.code = led; | 42 | led_ie.code = led; |
46 | led_ie.value = state; | 43 | led_ie.value = state; |
47 | diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 44 | diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp |
48 | index f86f80785e..3914698f2a 100644 | 45 | index 78728ef..1d65f9b 100644 |
49 | --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 46 | --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp |
50 | +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 47 | +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp |
51 | @@ -568,7 +568,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) | 48 | @@ -58,6 +58,11 @@ |
49 | #include <linux/input.h> | ||
50 | #endif | ||
51 | |||
52 | +#ifndef input_event_sec | ||
53 | +#define input_event_sec time.tv_sec | ||
54 | +#define input_event_usec time.tv_usec | ||
55 | +#endif | ||
56 | + | ||
57 | #include <math.h> | ||
58 | |||
59 | #if QT_CONFIG(mtdev) | ||
60 | @@ -573,7 +578,7 @@ | ||
52 | 61 | ||
53 | // update timestamps | 62 | // update timestamps |
54 | m_lastTimeStamp = m_timeStamp; | 63 | m_lastTimeStamp = m_timeStamp; |
@@ -57,6 +66,3 @@ index f86f80785e..3914698f2a 100644 | |||
57 | 66 | ||
58 | m_lastTouchPoints = m_touchPoints; | 67 | m_lastTouchPoints = m_touchPoints; |
59 | m_touchPoints.clear(); | 68 | m_touchPoints.clear(); |
60 | -- | ||
61 | 2.24.0 | ||
62 | |||