summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-09 18:52:29 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-12 09:31:39 (GMT)
commit681639c326f20b77329539b282b0eb4f173fe961 (patch)
tree5abce8a7da1c25f5e8abce5c28b68d410d20595f
parenta2e061b7aa2fda92d891d9783217a5d87b8df5d0 (diff)
downloadQt-681639c326f20b77329539b282b0eb4f173fe961.zip
Qt-681639c326f20b77329539b282b0eb4f173fe961.tar.gz
Qt-681639c326f20b77329539b282b0eb4f173fe961.tar.bz2
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
-rw-r--r--src/gui/kernel/qgesture.cpp13
-rw-r--r--src/gui/kernel/qgesture.h5
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;