summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
committerJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
commit9cacde74f7de702689725882633073e60c0a2baa (patch)
tree330d22dadbd28b14a7d8896823d1c33597e9993e /tools
parent006c8e22075112eff6230d8168d716e44a9e29d5 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-9cacde74f7de702689725882633073e60c0a2baa.zip
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.gz
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.bz2
Merge remote-tracking branch 'qt/4.8'
Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
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 10bf4a1..88c24d0 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/qscroller.h>
+#include <QtGui/qabstractkineticscroller.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());
-#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
+ 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());
+ }
}
}