summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
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
}
}