summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qabstractitemview.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
commit3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2 (patch)
treeb35fb5f723752378dd4fede93a6c35c0aeb85ad2 /src/gui/itemviews/qabstractitemview.cpp
parent1aeccd6bd14d7d9e098e333715f63e0225cd4a54 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.zip
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.gz
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index d671496..0bf85c6 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -62,9 +62,6 @@
#include <qaccessible.h>
#endif
#include <private/qsoftkeymanager_p.h>
-#ifndef QT_NO_GESTURE
-# include <qscroller.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -194,40 +191,6 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index
}
}
-#ifndef QT_NO_GESTURES
-
-// stores and restores the selection and current item when flicking
-void QAbstractItemViewPrivate::_q_scrollerStateChanged()
-{
- Q_Q(QAbstractItemView);
-
- if (QScroller *scroller = QScroller::scroller(viewport)) {
- switch (scroller->state()) {
- case QScroller::Pressed:
- // store the current selection in case we start scrolling
- if (q->selectionModel()) {
- oldSelection = q->selectionModel()->selection();
- oldCurrent = q->selectionModel()->currentIndex();
- }
- break;
-
- case QScroller::Dragging:
- // restore the old selection if we really start scrolling
- if (q->selectionModel()) {
- q->selectionModel()->select(oldSelection, QItemSelectionModel::ClearAndSelect);
- q->selectionModel()->setCurrentIndex(oldCurrent, QItemSelectionModel::NoUpdate);
- }
- // fall through
-
- default:
- oldSelection = QItemSelection();
- oldCurrent = QModelIndex();
- break;
- }
- }
-}
-
-#endif // QT_NO_GESTURES
/*!
\class QAbstractItemView
@@ -1662,13 +1625,6 @@ bool QAbstractItemView::viewportEvent(QEvent *event)
case QEvent::WindowDeactivate:
d->viewport->update();
break;
- case QEvent::ScrollPrepare:
- executeDelayedItemsLayout();
-#ifndef QT_NO_GESTURES
- connect(QScroller::scroller(d->viewport), SIGNAL(stateChanged(QScroller::State)), this, SLOT(_q_scrollerStateChanged()), Qt::UniqueConnection);
-#endif
- break;
-
default:
break;
}