summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2011-03-24 09:27:07 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2011-03-24 09:27:07 (GMT)
commitce80b75964ba5b1071112eb9bc04977da8079b23 (patch)
treee6fc4154aecc3581b9720d2f4482e97f3ecb3f49 /src/gui/itemviews
parentfdeeaa9d61efea9cca783a1d4098ae505df24390 (diff)
parent295fbcba490712fe6e6f61926836920366134b55 (diff)
downloadQt-ce80b75964ba5b1071112eb9bc04977da8079b23.zip
Qt-ce80b75964ba5b1071112eb9bc04977da8079b23.tar.gz
Qt-ce80b75964ba5b1071112eb9bc04977da8079b23.tar.bz2
Merge branch 'master-upstream'
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp5
-rw-r--r--src/gui/itemviews/qabstractitemview.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 291ec6e..d671496 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -194,6 +194,8 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index
}
}
+#ifndef QT_NO_GESTURES
+
// stores and restores the selection and current item when flicking
void QAbstractItemViewPrivate::_q_scrollerStateChanged()
{
@@ -225,6 +227,7 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged()
}
}
+#endif // QT_NO_GESTURES
/*!
\class QAbstractItemView
@@ -1661,7 +1664,9 @@ bool QAbstractItemView::viewportEvent(QEvent *event)
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:
diff --git a/src/gui/itemviews/qabstractitemview.h b/src/gui/itemviews/qabstractitemview.h
index 20cfb87..f11f209 100644
--- a/src/gui/itemviews/qabstractitemview.h
+++ b/src/gui/itemviews/qabstractitemview.h
@@ -359,7 +359,9 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed())
Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged())
Q_PRIVATE_SLOT(d_func(), void _q_headerDataChanged())
+#ifndef QT_NO_GESTURES
Q_PRIVATE_SLOT(d_func(), void _q_scrollerStateChanged())
+#endif
friend class QTreeViewPrivate; // needed to compile with MSVC
friend class QAccessibleItemRow;