Commit 49560f92 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port away from copying QEvent when building with Qt6

Copying QEvent in Qt6 isn't allowed, instead use clone().
parent 5d3774aa
......@@ -186,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;
}
......
Supports Markdown
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