Commit 864b59fc authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Port away from QWheelEvent::orientation()

We are supposed to use QWheelEvent::angleDelta() instead. Upon an
horizontal/vertical scroll event, its `x()`/`y()` method will return a
value different from zero.
parent 97a14db7
......@@ -176,8 +176,8 @@ void KItemListContainer::wheelEvent(QWheelEvent* event)
return;
}
const bool scrollHorizontally = (event->orientation() == Qt::Horizontal) ||
(event->orientation() == Qt::Vertical && !verticalScrollBar()->isVisible());
const bool scrollHorizontally = (event->angleDelta().x() != 0) ||
(event->angleDelta().y() != 0 && !verticalScrollBar()->isVisible());
KItemListSmoothScroller* smoothScroller = scrollHorizontally ?
m_horizontalSmoothScroller : m_verticalSmoothScroller;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment