From 681639c326f20b77329539b282b0eb4f173fe961 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 9 Oct 2009 20:52:29 +0200 Subject: Removed the QGesture contructor that we don't really need. The constructor that accepts a gesture type is not needed because the gesture type id will be generated by Qt and assigned to the QGesture object when a custom gesture recognizer is registered within the framework. Reviewed-by: trustme --- src/gui/kernel/qgesture.cpp | 13 +++++++------ src/gui/kernel/qgesture.h | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index bb74aec..cb46695 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -97,7 +97,7 @@ Qt::GestureState QGesture::state() const return d_func()->state; } -QObject* QGesture::targetObject() const +QObject *QGesture::targetObject() const { return d_func()->targetObject; } @@ -132,9 +132,9 @@ void QGesture::unsetHotSpot() // QPanGesture QPanGesture::QPanGesture(QObject *parent) - : QGesture(*new QPanGesturePrivate, Qt::PanGesture, parent) + : QGesture(*new QPanGesturePrivate, parent) { - + d_func()->gestureType = Qt::PanGesture; } QSizeF QPanGesture::totalOffset() const @@ -181,9 +181,9 @@ void QPanGesture::setAcceleration(qreal value) // QPinchGesture QPinchGesture::QPinchGesture(QObject *parent) - : QGesture(*new QPinchGesturePrivate, Qt::PinchGesture, parent) + : QGesture(*new QPinchGesturePrivate, parent) { - + d_func()->gestureType = Qt::PinchGesture; } QPinchGesture::WhatChanged QPinchGesture::whatChanged() const @@ -292,8 +292,9 @@ void QPinchGesture::setRotationAngle(qreal value) // QSwipeGesture QSwipeGesture::QSwipeGesture(QObject *parent) - : QGesture(*new QSwipeGesturePrivate, Qt::SwipeGesture, parent) + : QGesture(*new QSwipeGesturePrivate, parent) { + d_func()->gestureType = Qt::SwipeGesture; } QSwipeGesture::SwipeDirection QSwipeGesture::horizontalDirection() const diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index b37120f..bf72759 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -70,8 +70,7 @@ class Q_GUI_EXPORT QGesture : public QObject Q_PROPERTY(QObject* targetObject READ targetObject WRITE setTargetObject) public: - explicit QGesture(Qt::GestureType type = Qt::CustomGesture, QObject *parent = 0); - explicit QGesture(QObject *parent); + explicit QGesture(QObject *parent = 0); ~QGesture(); Qt::GestureType gestureType() const; @@ -87,7 +86,7 @@ public: void unsetHotSpot(); protected: - QGesture(QGesturePrivate &dd, Qt::GestureType type, QObject *parent); + QGesture(QGesturePrivate &dd, QObject *parent); private: friend class QGestureEvent; -- cgit v0.12