summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qscrollbar.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-21 12:16:09 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-08-22 21:47:36 +0200
commit16e546e32fec393bc3b126f280114bcbfa7151ff (patch)
tree0d8d1f88fdd29ba5a28c3a5039bd7f6e6b76727c /src/widgets/widgets/qscrollbar.cpp
parent4b1ffab8ad95eda737fde015c243442a28de8e23 (diff)
Properly deprecate Qt::MidButton in favor of Qt::MiddleButton
MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/widgets/qscrollbar.cpp')
-rw-r--r--src/widgets/widgets/qscrollbar.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index cf2a3c5bfe..de58e8ffe7 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -557,7 +557,7 @@ void QScrollBar::mousePressEvent(QMouseEvent *e)
if (d->maximum == d->minimum // no range
|| (e->buttons() & (~e->button())) // another button was clicked before
- || !(e->button() == Qt::LeftButton || (midButtonAbsPos && e->button() == Qt::MidButton)))
+ || !(e->button() == Qt::LeftButton || (midButtonAbsPos && e->button() == Qt::MiddleButton)))
return;
d->pressedControl = style()->hitTestComplexControl(QStyle::CC_ScrollBar, &opt, e->position().toPoint(), this);
@@ -576,7 +576,7 @@ void QScrollBar::mousePressEvent(QMouseEvent *e)
if ((d->pressedControl == QStyle::SC_ScrollBarAddPage
|| d->pressedControl == QStyle::SC_ScrollBarSubPage)
- && ((midButtonAbsPos && e->button() == Qt::MidButton)
+ && ((midButtonAbsPos && e->button() == Qt::MiddleButton)
|| (style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, &opt, this)
&& e->button() == Qt::LeftButton))) {
int sliderLength = HORIZONTAL ? sr.width() : sr.height();
@@ -632,7 +632,7 @@ void QScrollBar::mouseMoveEvent(QMouseEvent *e)
QStyleOptionSlider opt;
initStyleOption(&opt);
if (!(e->buttons() & Qt::LeftButton
- || ((e->buttons() & Qt::MidButton)
+ || ((e->buttons() & Qt::MiddleButton)
&& style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, &opt, this))))
return;