summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesturemanager.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-24 16:53:07 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-03-04 12:07:07 (GMT)
commit8327f68945134b8057b0ade7d19897e226d3a7b5 (patch)
tree578a49d3fa62d4e8fa3455b764757cb144b2cbbb /src/gui/kernel/qgesturemanager.cpp
parent17c5b2620178ce59d0d85d91c03880fc8b0d9992 (diff)
downloadQt-8327f68945134b8057b0ade7d19897e226d3a7b5.zip
Qt-8327f68945134b8057b0ade7d19897e226d3a7b5.tar.gz
Qt-8327f68945134b8057b0ade7d19897e226d3a7b5.tar.bz2
Dont use gestures if there is no touch screen.
If there is no touch input device attached on Windows7, we shouldn't even bother subscribing to native gesture events. Task-number: QTBUG-6007 Reviewed-by: Thierry Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel/qgesturemanager.cpp')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 89ad94d..aa6720e 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -45,6 +45,7 @@
#include "private/qgesture_p.h"
#include "private/qgraphicsitem_p.h"
#include "private/qevent_p.h"
+#include "private/qapplication_p.h"
#include "qgesture.h"
#include "qevent.h"
#include "qgraphicsitem.h"
@@ -86,7 +87,8 @@ QGestureManager::QGestureManager(QObject *parent)
#endif
#if defined(Q_OS_WIN)
#if !defined(QT_NO_NATIVE_GESTURES)
- registerGestureRecognizer(new QWinNativePanGestureRecognizer);
+ if (QApplicationPrivate::HasTouchSupport)
+ registerGestureRecognizer(new QWinNativePanGestureRecognizer);
#endif
#else
registerGestureRecognizer(new QTapAndHoldGestureRecognizer);