diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-19 15:24:48 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-20 12:27:38 (GMT) |
commit | 18eccf4189f4a093fb7d2418a1f3518da971aefa (patch) | |
tree | 7b11a7e44dfa85678b42a79920472fc7a4892dd4 /src/gui/itemviews/qabstractitemview.cpp | |
parent | 26932652ac38f64fee86b50a72c709dfba81647a (diff) | |
download | Qt-18eccf4189f4a093fb7d2418a1f3518da971aefa.zip Qt-18eccf4189f4a093fb7d2418a1f3518da971aefa.tar.gz Qt-18eccf4189f4a093fb7d2418a1f3518da971aefa.tar.bz2 |
QListView refactor: we now have an interface for the 2 view modes
Now we have 2 real implementations for listviews and iconviews
This is a big refactor but the behaviour is kept.
It also fixes a crash that could occur in setPositionForIndex
while in ListMode.
Acknowledged-By: ogoffart
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 9eb71b7..d79a378 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -3378,11 +3378,7 @@ QPoint QAbstractItemView::dirtyRegionOffset() const */ void QAbstractItemView::startAutoScroll() { - Q_D(QAbstractItemView); - // ### it would be nice to make this into a style hint one day - int scrollInterval = (verticalScrollMode() == QAbstractItemView::ScrollPerItem) ? 150 : 50; - d->autoScrollTimer.start(scrollInterval, this); - d->autoScrollCount = 0; + d_func()->startAutoScroll(); } /*! @@ -3390,9 +3386,7 @@ void QAbstractItemView::startAutoScroll() */ void QAbstractItemView::stopAutoScroll() { - Q_D(QAbstractItemView); - d->autoScrollTimer.stop(); - d->autoScrollCount = 0; + d_func()->stopAutoScroll(); } /*! |