2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #6559 from german77/compilation_warnings

Replace usages of deprecated member functions in QMouseEvent and QWheelEvent
This commit is contained in:
Morph 2021-07-05 11:23:11 -04:00 committed by GitHub
commit dd44089f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,24 +143,25 @@ void MicroProfileWidget::hideEvent(QHideEvent* ev) {
} }
void MicroProfileWidget::mouseMoveEvent(QMouseEvent* ev) { void MicroProfileWidget::mouseMoveEvent(QMouseEvent* ev) {
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0); MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
ev->accept(); ev->accept();
} }
void MicroProfileWidget::mousePressEvent(QMouseEvent* ev) { void MicroProfileWidget::mousePressEvent(QMouseEvent* ev) {
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0); MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton); MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
ev->accept(); ev->accept();
} }
void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* ev) { void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* ev) {
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, 0); MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton); MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
ev->accept(); ev->accept();
} }
void MicroProfileWidget::wheelEvent(QWheelEvent* ev) { void MicroProfileWidget::wheelEvent(QWheelEvent* ev) {
MicroProfileMousePosition(ev->x() / x_scale, ev->y() / y_scale, ev->delta() / 120); MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale,
ev->angleDelta().y() / 120);
ev->accept(); ev->accept();
} }