Declare layer compatibility with zeus
[AGL/meta-agl-demo.git] / recipes-qt / qt5 / qtlocation / 0001-Fix-unstable-rotation-gesture.patch
1 From 85df79b094d1097108a28424d6f9b3b76b3aee62 Mon Sep 17 00:00:00 2001
2 From: Tasuku Suzuki <tasuku.suzuki@qt.io>
3 Date: Thu, 8 Nov 2018 15:26:57 +0900
4 Subject: [PATCH] Fix unstable rotation gesture
5
6 Order of touch events are not sorted on some platform. When touch point
7 1 and
8 2 are swapped, map is rotated 180 degrees in a moment
9
10 Change-Id: I9c308b805a6ca54519f26a9ff19217de7f947c17
11 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
12 ---
13  src/location/declarativemaps/qquickgeomapgesturearea.cpp | 1 +
14  1 file changed, 1 insertion(+)
15
16 diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
17 index c6f4b42..576aeee 100644
18 --- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp
19 +++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp
20 @@ -1087,6 +1087,7 @@ void QQuickGeoMapGestureArea::update()
21      m_allPoints << m_touchPoints;
22      if (m_allPoints.isEmpty() && !m_mousePoint.isNull())
23          m_allPoints << *m_mousePoint.data();
24 +    std::sort(m_allPoints.begin(), m_allPoints.end(), [](const QTouchEvent::TouchPoint &tp1, const QTouchEvent::TouchPoint &tp2) { return tp1.id() < tp2.id(); });
25  
26      touchPointStateMachine();
27  
28 -- 
29 2.7.4
30