Browse Source

Don't use QWheelEvent deprecated functions

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
2fd4381398
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 9
      src/gui/properties/peerlistwidget.cpp
  2. 9
      src/gui/transferlistwidget.cpp

9
src/gui/properties/peerlistwidget.cpp

@ -451,7 +451,14 @@ void PeerListWidget::wheelEvent(QWheelEvent *event) @@ -451,7 +451,14 @@ void PeerListWidget::wheelEvent(QWheelEvent *event)
// Shift + scroll = horizontal scroll
event->accept();
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QWheelEvent scrollHEvent(event->position(), event->globalPosition()
, event->pixelDelta(), event->angleDelta().transposed(), event->buttons()
, event->modifiers(), event->phase(), event->inverted(), event->source());
#else
QWheelEvent scrollHEvent(event->pos(), event->globalPos()
, event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
#endif
QTreeView::wheelEvent(&scrollHEvent);
return;
}

9
src/gui/transferlistwidget.cpp

@ -1204,7 +1204,14 @@ void TransferListWidget::wheelEvent(QWheelEvent *event) @@ -1204,7 +1204,14 @@ void TransferListWidget::wheelEvent(QWheelEvent *event)
// Shift + scroll = horizontal scroll
event->accept();
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QWheelEvent scrollHEvent(event->position(), event->globalPosition()
, event->pixelDelta(), event->angleDelta().transposed(), event->buttons()
, event->modifiers(), event->phase(), event->inverted(), event->source());
#else
QWheelEvent scrollHEvent(event->pos(), event->globalPos()
, event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
#endif
QTreeView::wheelEvent(&scrollHEvent);
return;
}

Loading…
Cancel
Save