summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@nokia.com>2010-11-30 22:44:52 +0100
committerRobert Griebl <robert.griebl@nokia.com>2010-12-02 01:04:34 +0100
commit0274e68767cce6440515a68d6af868725d5577a4 (patch)
tree7b219fb5cce3c9e76ae966f13401ae13bad9b28d /tools
parentf6f8ba94d5f82b8df723a217a3d0ecb50e570cbc (diff)
downloadqt4-tools-0274e68767cce6440515a68d6af868725d5577a4.tar.gz
QScroller merge, part 1
This merge consists of the actual kinetic scroller implementation, its autotests plus a few examples. QAbstractScrollArea and QAbstractItemView have been extended to support the new scroll events. The complete history is in http://scm.dev.nokia.troll.no/projects/qt/repos/rgriebls-qt-flickgesture/logs/4.7-flickgesture (part 2 is the QML Flickable replacement / part 3 is QWebView support) Task-number: QTBUG-9054 Reviewed-by: Ralf Engels
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/texteditautoresizer_maemo5.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qml/texteditautoresizer_maemo5.h b/tools/qml/texteditautoresizer_maemo5.h
index bb5567a4c2..fd35ca52f0 100644
--- a/tools/qml/texteditautoresizer_maemo5.h
+++ b/tools/qml/texteditautoresizer_maemo5.h
@@ -41,7 +41,7 @@
#include <QtGui/qplaintextedit.h>
#include <QtGui/qtextedit.h>
-#include <QtGui/qabstractkineticscroller.h>
+#include <QtGui/qscroller.h>
#include <QtGui/qscrollarea.h>
#include <QtDebug>
@@ -102,11 +102,11 @@ void TextEditAutoResizer::textEditChanged()
QPoint scrollto = area->widget()->mapFrom(edit, cursor.center());
QPoint margin(10 + cursor.width(), 2 * cursor.height());
- if (QAbstractKineticScroller *scroller = area->property("kineticScroller").value<QAbstractKineticScroller *>()) {
- scroller->ensureVisible(scrollto, margin.x(), margin.y());
- } else {
- area->ensureVisible(scrollto.x(), scrollto.y(), margin.x(), margin.y());
- }
+#ifdef Q_WS_MAEMO_5
+ QScroller::scroller(area)->ensureVisible(scrollto, margin.x(), margin.y());
+#else
+ area->ensureVisible(scrollto.x(), scrollto.y(), margin.x(), margin.y());
+#endif
}
}