summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@nokia.com>2010-06-02 07:35:14 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2010-06-02 07:37:03 (GMT)
commitf62926954a742990a33a54ad598de1af0989d92b (patch)
tree34a392cc5c8359eac142207c3c726294c514d822 /src/gui/kernel/qapplication.cpp
parent37a0291f932b0af0f6844898ccbce52415f0f179 (diff)
downloadQt-f62926954a742990a33a54ad598de1af0989d92b.zip
Qt-f62926954a742990a33a54ad598de1af0989d92b.tar.gz
Qt-f62926954a742990a33a54ad598de1af0989d92b.tar.bz2
Add a new qconfig feature GESTURES
Merge-request: 535 Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 09a3bfe..c9a3e8b 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -187,8 +187,10 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
directPainters = 0;
#endif
+#ifndef QT_NO_GESTURES
gestureManager = 0;
gestureWidget = 0;
+#endif // QT_NO_GESTURES
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
move_cursor = 0;
@@ -3718,6 +3720,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
#endif // !QT_NO_WHEELEVENT || !QT_NO_TABLETEVENT
}
+#ifndef QT_NO_GESTURES
// walk through parents and check for gestures
if (d->gestureManager) {
switch (e->type()) {
@@ -3762,7 +3765,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
}
}
-
+#endif // QT_NO_GESTURES
// User input and window activation makes tooltips sleep
switch (e->type()) {
@@ -4267,6 +4270,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
res = d->notify_helper(receiver, e);
break;
+#ifndef QT_NO_GESTURES
case QEvent::NativeGesture:
{
// only propagate the first gesture event (after the GID_BEGIN)
@@ -4345,6 +4349,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
break;
}
+#endif // QT_NO_GESTURES
default:
res = d->notify_helper(receiver, e);
break;
@@ -5777,6 +5782,7 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
QApplicationPrivate::translateRawTouchEvent(window, deviceType, touchPoints);
}
+#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
@@ -5784,6 +5790,7 @@ QGestureManager* QGestureManager::instance()
qAppPriv->gestureManager = new QGestureManager(qApp);
return qAppPriv->gestureManager;
}
+#endif // QT_NO_GESTURES
// These pixmaps approximate the images in the Windows User Interface Guidelines.