summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-09 11:28:58 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-09 11:35:44 (GMT)
commitd6a23684c8546fcd20ac032aa01985ca7ac69128 (patch)
tree9118f64e7216589c51a8c09b99b562552107c198 /src/gui/widgets
parent683cca297d29e7ea9f84c087a3c081dcccea48fb (diff)
downloadQt-d6a23684c8546fcd20ac032aa01985ca7ac69128.zip
Qt-d6a23684c8546fcd20ac032aa01985ca7ac69128.tar.gz
Qt-d6a23684c8546fcd20ac032aa01985ca7ac69128.tar.bz2
Fixed pan gesture handlers in standard Qt widgets.
Reviewed-by: Richard
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 7d81d5a..1a4ee2b 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -946,7 +946,7 @@ bool QAbstractScrollArea::event(QEvent *e)
if (g) {
QScrollBar *hBar = horizontalScrollBar();
QScrollBar *vBar = verticalScrollBar();
- QPointF delta = g->lastOffset();
+ QPointF delta = g->delta();
if (!delta.isNull()) {
if (QApplication::isRightToLeft())
delta.rx() *= -1;
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 0de7421..18adc6c 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1465,7 +1465,7 @@ bool QPlainTextEdit::event(QEvent *e)
// QPlainTextEdit scrolls by lines only in vertical direction
QFontMetrics fm(document()->defaultFont());
int lineHeight = fm.height();
- int newX = hBar->value() - g->lastOffset().x();
+ int newX = hBar->value() - g->delta().x();
int newY = d->originalOffsetY - offset.y()/lineHeight;
hBar->setValue(newX);
vBar->setValue(newY);