mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Port away from copying QEvent when building with Qt6
Copying QEvent in Qt6 isn't allowed, instead use clone().
This commit is contained in:
parent
5d3774aa17
commit
49560f921d
|
@ -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, ©);
|
||||
event->setAccepted(copy.isAccepted());
|
||||
#endif
|
||||
|
||||
m_smoothScrolling = previous;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue