summaryrefslogtreecommitdiffstats
path: root/config.profiles/harmattan/patches/pinch_gesture_sent_twice.diff
blob: 61dfbf9ffff5a1a98e4c336c9a6be12e54396288 (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
Index: qt-maemo-qtp/src/gui/kernel/qstandardgestures.cpp
===================================================================
--- qt-maemo-qtp.orig/src/gui/kernel/qstandardgestures.cpp
+++ qt-maemo-qtp/src/gui/kernel/qstandardgestures.cpp
@@ -66,6 +66,9 @@
 #else
         static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
 #endif
+    } else if (target) {
+        return 0; // this assumes the target is a QGraphicsObject, so we return
+                  // NULL to indicate that the recognizer doesn't support graphicsobject
     }
     return new QPanGesture;
 }
@@ -157,7 +160,11 @@
 {
     if (target && target->isWidgetType()) {
         static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+    } else if (target) {
+        return 0; // this assumes the target is a QGraphicsObject, so we return
+                  // NULL to indicate that the recognizer doesn't support graphicsobject
     }
+
     return new QPinchGesture;
 }
 
@@ -286,6 +293,9 @@
 {
     if (target && target->isWidgetType()) {
         static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+    } else if (target) {
+        return 0; // this assumes the target is a QGraphicsObject, so we return
+                  // NULL to indicate that the recognizer doesn't support graphicsobject
     }
     return new QSwipeGesture;
 }
@@ -424,6 +434,9 @@
 {
     if (target && target->isWidgetType()) {
         static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+    } else if (target) {
+        return 0; // this assumes the target is a QGraphicsObject, so we return
+                  // NULL to indicate that the recognizer doesn't support graphicsobject
     }
     return new QTapGesture;
 }
@@ -495,6 +508,9 @@
 {
     if (target && target->isWidgetType()) {
         static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+    } else if (target) {
+        return 0; // this assumes the target is a QGraphicsObject, so we return
+                  // NULL to indicate that the recognizer doesn't support graphicsobject
     }
     return new QTapAndHoldGesture;
 }