summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 12:00:50 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-11 12:00:50 (GMT)
commitecc7f07e612bf156afb7fa2dbcbd2288b9b32e79 (patch)
tree88bbdcb558ef7337d3d3621b3b706f004505c569 /src/testlib
parent666299f9074235185aa7372729c84a2639224601 (diff)
downloadQt-ecc7f07e612bf156afb7fa2dbcbd2288b9b32e79.zip
Qt-ecc7f07e612bf156afb7fa2dbcbd2288b9b32e79.tar.gz
Qt-ecc7f07e612bf156afb7fa2dbcbd2288b9b32e79.tar.bz2
remove duplicated code and API (merge QTouchEvent and QGraphicsSceneTouchEvent)
the API for these 2 classes is identical, the implementation is almost identical, they share the same data structures, so bite the bullet and merge them. this means we go back to using screenPos() instead of globalPos() again
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtesttouch.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h
index 2db015a..141cb4d 100644
--- a/src/testlib/qtesttouch.h
+++ b/src/testlib/qtesttouch.h
@@ -78,21 +78,21 @@ namespace QTest
QTouchEventSequence& press(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
- p.setGlobalPos(mapToScreen(widget, pt));
+ p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointPressed);
return *this;
}
QTouchEventSequence& move(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
- p.setGlobalPos(mapToScreen(widget, pt));
+ p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointMoved);
return *this;
}
QTouchEventSequence& release(int touchId, const QPoint &pt, QWidget *widget = 0)
{
QTouchEvent::TouchPoint &p = point(touchId);
- p.setGlobalPos(mapToScreen(widget, pt));
+ p.setScreenPos(mapToScreen(widget, pt));
p.setState(Qt::TouchPointReleased);
return *this;
}