]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistsmoothscroller.cpp
Add Page count and Publisher columns
[dolphin.git] / src / kitemviews / private / kitemlistsmoothscroller.cpp
index 1465361ed38846bd0f54498a6e87d620c10ddb20..343399179b39d70d73489a1c31d83dc95bbc12a2 100644 (file)
@@ -175,6 +175,9 @@ void KItemListSmoothScroller::slotAnimationStateChanged(QAbstractAnimation::Stat
     if (newState == QAbstractAnimation::Stopped && m_smoothScrolling && !m_scrollBarPressed) {
         m_smoothScrolling = false;
     }
+    if (newState == QAbstractAnimation::Stopped) {
+        Q_EMIT scrollingStopped();
+    }
 }
 
 void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event)
@@ -183,9 +186,15 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event)
 
     m_smoothScrolling = true;
 
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+    QWheelEvent *copy = event->clone();
+    QApplication::sendEvent(m_scrollBar, copy);
+    event->setAccepted(copy->isAccepted());
+#else
     QWheelEvent copy = *event;
     QApplication::sendEvent(m_scrollBar, &copy);
     event->setAccepted(copy.isAccepted());
+#endif
 
     m_smoothScrolling = previous;
 }