summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-17 00:59:56 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-17 00:59:56 +1000
commit219175903f9722bee12271321614cdaeb88eb914 (patch)
tree8451797482725dc11d351667e0945de2e57644f2 /tools/qml
parent7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff)
parent4f7af4c544c3b793ba8cccb28e5c856f3d754e4a (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Revert all QScroller and QFlickGesture related code. Fix regression that caused waitForXXX(-1) to fail.
Diffstat (limited to 'tools/qml')
-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 71dbce0a1f..e82d0066c2 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());
+ }
}
}