From f40f2eed49c143f704de3538fd847e1fa3be8164 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 17 Jan 2021 05:42:40 +0200 Subject: [PATCH 16/16] Qt: Restore QWheelEvent::source() and QWheelEvent::phase() to use We couldn't use them in earlier branches that had lower minimum Qt requirement. See osdn #41189 Signed-off-by: Marko Lindqvist --- client/gui-qt/citydlg.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/client/gui-qt/citydlg.cpp b/client/gui-qt/citydlg.cpp index 0d2bad835c..68d40961e2 100644 --- a/client/gui-qt/citydlg.cpp +++ b/client/gui-qt/citydlg.cpp @@ -531,13 +531,13 @@ void impr_info::wheelEvent(QWheelEvent *event) event->angleDelta(), event->buttons(), event->modifiers(), - event->phase(), false); + event->phase(), false, event->source()); #else /* FC_QT6_MODE */ QWheelEvent new_event(QPoint(5, 5), p + QPoint(5,5), event->pixelDelta(), event->angleDelta(), event->angleDelta().y(), Qt::Horizontal, event->buttons(), - event->modifiers()); + event->modifiers(), event->phase(), event->source()); #endif /* FC_QT6_MODE */ QApplication::sendEvent(parentWidget(), &new_event); } @@ -588,13 +588,13 @@ void impr_item::wheelEvent(QWheelEvent *event) event->angleDelta(), event->buttons(), event->modifiers(), - event->phase(), false); + event->phase(), false, event->source()); #else /* FC_QT6_MODE */ QWheelEvent new_event(QPoint(5, 5), p + QPoint(5,5), event->pixelDelta(), event->angleDelta(), event->angleDelta().y(), Qt::Horizontal, event->buttons(), - event->modifiers()); + event->modifiers(), event->phase(), event->source()); #endif /* FC_QT6_MODE */ QApplication::sendEvent(parentWidget()->parentWidget(), &new_event); @@ -998,19 +998,18 @@ void unit_item::wheelEvent(QWheelEvent *event) event->angleDelta(), event->buttons(), event->modifiers(), - event->phase(), false); + event->phase(), false, event->source()); #else /* FC_QT6_MODE */ QWheelEvent new_event(QPoint(5, 5), p + QPoint(5,5), event->pixelDelta(), event->angleDelta(), event->angleDelta().y(), Qt::Horizontal, event->buttons(), - event->modifiers()); + event->modifiers(), event->phase(), event->source()); #endif /* FC_QT6_MODE */ QApplication::sendEvent(parentWidget()->parentWidget(), &new_event); } - /************************************************************************//** Mouse press event -activates unit and closes dialog ****************************************************************************/ @@ -1087,13 +1086,13 @@ void unit_info::wheelEvent(QWheelEvent *event) event->angleDelta(), event->buttons(), event->modifiers(), - event->phase(), false); + event->phase(), false, event->source()); #else /* FC_QT6_MODE */ QWheelEvent new_event(QPoint(5, 5), p + QPoint(5,5), event->pixelDelta(), event->angleDelta(), event->angleDelta().y(), Qt::Horizontal, event->buttons(), - event->modifiers()); + event->modifiers(), event->phase(), event->source()); #endif /* FC_QT6_MODE */ QApplication::sendEvent(parentWidget(), &new_event); } -- 2.29.2