From 005a338f169b485077c248358e1cde96d22ae506 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 21 Jul 2020 12:04:25 +0200 Subject: Replace Qt::MidButton with Qt::MiddleButton The latter has been the preferred name since Qt 4.7.0. (Pick back to 5.15 shall need to drop the test change, as the test was added to dev after it diverged from 5.15.) Pick-to: 5.15 Change-Id: I3154ea1203e741cb337782d3374e02e15c5f209e Reviewed-by: Allan Sandfeld Jensen --- src/core/web_event_factory.cpp | 6 +++--- tests/manual/quick/touchbrowser/touchmockingapplication.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 428ef6068..5d5086d34 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1227,7 +1227,7 @@ static WebMouseEvent::Button mouseButtonForEvent(T *event) return WebMouseEvent::Button::kLeft; else if (event->button() == Qt::RightButton) return WebMouseEvent::Button::kRight; - else if (event->button() == Qt::MidButton) + else if (event->button() == Qt::MiddleButton) return WebMouseEvent::Button::kMiddle; if (event->type() != QEvent::MouseMove && event->type() != QEvent::TabletMove) @@ -1239,7 +1239,7 @@ static WebMouseEvent::Button mouseButtonForEvent(T *event) return WebMouseEvent::Button::kLeft; else if (event->buttons() & Qt::RightButton) return WebMouseEvent::Button::kRight; - else if (event->buttons() & Qt::MidButton) + else if (event->buttons() & Qt::MiddleButton) return WebMouseEvent::Button::kMiddle; return WebMouseEvent::Button::kNoButton; @@ -1253,7 +1253,7 @@ static unsigned mouseButtonsModifiersForEvent(const T* event) ret |= WebInputEvent::kLeftButtonDown; if (event->buttons() & Qt::RightButton) ret |= WebInputEvent::kRightButtonDown; - if (event->buttons() & Qt::MidButton) + if (event->buttons() & Qt::MiddleButton) ret |= WebInputEvent::kMiddleButtonDown; return ret; } diff --git a/tests/manual/quick/touchbrowser/touchmockingapplication.cpp b/tests/manual/quick/touchbrowser/touchmockingapplication.cpp index 5bc0196e9..41b731a6a 100644 --- a/tests/manual/quick/touchbrowser/touchmockingapplication.cpp +++ b/tests/manual/quick/touchbrowser/touchmockingapplication.cpp @@ -158,8 +158,8 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event) // A move can have resulted in multiple buttons, so we need check them individually. if (touchPoint.id() & Qt::LeftButton) updateTouchPoint(mouseEvent, touchPoint, Qt::LeftButton); - if (touchPoint.id() & Qt::MidButton) - updateTouchPoint(mouseEvent, touchPoint, Qt::MidButton); + if (touchPoint.id() & Qt::MiddleButton) + updateTouchPoint(mouseEvent, touchPoint, Qt::MiddleButton); if (touchPoint.id() & Qt::RightButton) updateTouchPoint(mouseEvent, touchPoint, Qt::RightButton); -- cgit v1.2.3