fix deprecated warning int QWheelEvent::delta() const

Use angleDelta() instead

manhattanLength()
Returns the sum of the absolute values of x() and y(),
traditionally known as the "Manhattan length" of the vector
from the origin to the point.

This class was introduced in Qt 5.5
This commit is contained in:
Simon De Backer
2020-06-10 20:26:58 +02:00
committed by Laurent Trinques
parent bb093ba0cd
commit 71abaf92cb
2 changed files with 3 additions and 3 deletions

View File

@@ -511,7 +511,7 @@ qreal TitleBlockTemplateView::templateHeight() const {
void TitleBlockTemplateView::wheelEvent(QWheelEvent *e) {
// si la touche Ctrl est enfoncee, on zoome / dezoome
if (e -> modifiers() & Qt::ControlModifier) {
if (e -> delta() > 0) {
if (e -> angleDelta().manhattanLength() > 0) {
zoomIn();
} else {
zoomOut();