summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-03-16 15:04:13 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-05-11 14:51:37 (GMT)
commita72e6d351f136e0cd5e0f9c178e5f09eb70ca2db (patch)
treefc69eb6f0d84d8504fe91e2b196a482796763d7e /src
parent2e91de4a0046c17ff41f4ed533542a5fc3858087 (diff)
downloadQt-a72e6d351f136e0cd5e0f9c178e5f09eb70ca2db.zip
Qt-a72e6d351f136e0cd5e0f9c178e5f09eb70ca2db.tar.gz
Qt-a72e6d351f136e0cd5e0f9c178e5f09eb70ca2db.tar.bz2
Removed the use of QSharedPointer from gesture api - since QGesture
are QObject now everything is much simplier.
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.h7
-rw-r--r--src/gui/kernel/qevent.cpp6
-rw-r--r--src/gui/kernel/qevent.h5
-rw-r--r--src/gui/kernel/qgesture.h1
5 files changed, 12 insertions, 15 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index c79e30b..b26f8cf 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -1773,7 +1773,7 @@ QList<QString> QGraphicsSceneGestureEvent::gestureTypes() const
*/
const QGesture* QGraphicsSceneGestureEvent::gesture(const QString &type) const
{
- return m_gestures.value(type, QSharedPointer<QGesture>()).data();
+ return m_gestures.value(type, 0);
}
/*!
@@ -1787,7 +1787,7 @@ const QGesture* QGraphicsSceneGestureEvent::gesture(Qt::GestureType type) const
/*!
Returns extended information about all gestures in the event.
*/
-QList<QSharedPointer<QGesture> > QGraphicsSceneGestureEvent::gestures() const
+QList<QGesture*> QGraphicsSceneGestureEvent::gestures() const
{
return m_gestures.values();
}
@@ -1884,9 +1884,9 @@ QPolygonF QGraphicsSceneGestureEvent::mapToItem(const QRect &rect, QGraphicsItem
/*!
Set a list of gesture objects containing extended information about \a gestures.
*/
-void QGraphicsSceneGestureEvent::setGestures(const QList<QSharedPointer<QGesture> > &gestures)
+void QGraphicsSceneGestureEvent::setGestures(const QList<QGesture*> &gestures)
{
- foreach(const QSharedPointer<QGesture> &g, gestures)
+ foreach(QGesture *g, gestures)
m_gestures.insert(g->gestureType(), g);
}
diff --git a/src/gui/graphicsview/qgraphicssceneevent.h b/src/gui/graphicsview/qgraphicssceneevent.h
index d1a301e..244c25e 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.h
+++ b/src/gui/graphicsview/qgraphicssceneevent.h
@@ -48,7 +48,6 @@
#include <QtGui/qpolygon.h>
#include <QtCore/qset.h>
#include <QtCore/qhash.h>
-#include <QtCore/qsharedpointer.h>
QT_BEGIN_HEADER
@@ -324,8 +323,8 @@ public:
const QGesture* gesture(Qt::GestureType type) const;
const QGesture* gesture(const QString &type) const;
- QList<QSharedPointer<QGesture> > gestures() const;
- void setGestures(const QList<QSharedPointer<QGesture> > &gestures);
+ QList<QGesture*> gestures() const;
+ void setGestures(const QList<QGesture*> &gestures);
QSet<QString> cancelledGestures() const;
void setCancelledGestures(const QSet<QString> &cancelledGestures);
@@ -336,7 +335,7 @@ public:
QPolygonF mapToItem(const QRect &rect, QGraphicsItem *item) const;
protected:
- QHash<QString, QSharedPointer<QGesture> > m_gestures;
+ QHash<QString, QGesture*> m_gestures;
QSet<QString> m_cancelledGestures;
};
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index dbfe528..23a45b5 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3537,7 +3537,7 @@ QGestureEvent::QGestureEvent(const QList<QGesture*> &gestures,
: QEvent(QEvent::Gesture), m_cancelledGestures(cancelledGestures)
{
foreach(QGesture *r, gestures)
- m_gestures.insert(r->gestureType(), QSharedPointer<QGesture>(r));
+ m_gestures.insert(r->gestureType(), r);
}
/*!
@@ -3586,13 +3586,13 @@ const QGesture* QGestureEvent::gesture(Qt::GestureType type) const
*/
const QGesture* QGestureEvent::gesture(const QString &type) const
{
- return m_gestures.value(type, QSharedPointer<QGesture>()).data();
+ return m_gestures.value(type, 0);
}
/*!
Returns extended information about all gestures in the event.
*/
-QList<QSharedPointer<QGesture> > QGestureEvent::gestures() const
+QList<QGesture*> QGestureEvent::gestures() const
{
return m_gestures.values();
}
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 41005d8..280ca79 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -54,7 +54,6 @@
#include <QtCore/qvariant.h>
#include <QtCore/qmap.h>
#include <QtCore/qset.h>
-#include <QtCore/qsharedpointer.h>
#include <QtGui/qgesture.h>
QT_BEGIN_HEADER
@@ -728,12 +727,12 @@ public:
const QGesture* gesture(Qt::GestureType type) const;
const QGesture* gesture(const QString &type) const;
- QList<QSharedPointer<QGesture> > gestures() const;
+ QList<QGesture*> gestures() const;
QSet<QString> cancelledGestures() const;
protected:
- QHash<QString, QSharedPointer<QGesture> > m_gestures;
+ QHash<QString, QGesture*> m_gestures;
QSet<QString> m_cancelledGestures;
friend class QApplication;
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index b9e86a3..d4b2165 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -47,7 +47,6 @@
#include "qdatetime.h"
#include "qpoint.h"
#include "qrect.h"
-#include "qsharedpointer.h"
#include "qmetatype.h"
QT_BEGIN_HEADER