diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-16 14:59:56 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-16 14:59:56 (GMT) |
commit | 219175903f9722bee12271321614cdaeb88eb914 (patch) | |
tree | 8451797482725dc11d351667e0945de2e57644f2 /tools | |
parent | 7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff) | |
parent | 4f7af4c544c3b793ba8cccb28e5c856f3d754e4a (diff) | |
download | Qt-219175903f9722bee12271321614cdaeb88eb914.zip Qt-219175903f9722bee12271321614cdaeb88eb914.tar.gz Qt-219175903f9722bee12271321614cdaeb88eb914.tar.bz2 |
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')
-rw-r--r-- | tools/qml/texteditautoresizer_maemo5.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qml/texteditautoresizer_maemo5.h b/tools/qml/texteditautoresizer_maemo5.h index 71dbce0..e82d006 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()); + } } } |