summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-21 12:04:25 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-07-22 11:15:44 +0200
commit005a338f169b485077c248358e1cde96d22ae506 (patch)
treed851466f07e67d5367a98213781625ce67bbba8e
parentfa3b416ca4993c11bee91e1c52ef4aea8ad4438a (diff)
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 <allan.jensen@qt.io>
-rw-r--r--src/core/web_event_factory.cpp6
-rw-r--r--tests/manual/quick/touchbrowser/touchmockingapplication.cpp4
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);