summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/qabstractslider.cpp2
-rw-r--r--tests/auto/qabstractslider/tst_qabstractslider.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index f0ae5a8..73c17db 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -739,8 +739,6 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
{
Q_D(QAbstractSlider);
e->ignore();
- if (e->orientation() != d->orientation && !rect().contains(e->pos()))
- return;
int delta = e->delta();
if (d->scrollByDelta(e->orientation(), e->modifiers(), delta))
e->accept();
diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp
index 40281c6..293af36 100644
--- a/tests/auto/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp
@@ -768,7 +768,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< true // inverted controls
<< 20 // wheel scroll lines
<< false // with modifiers
- << 1 // delta
+ << -1 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 30 // expected position after
@@ -782,7 +782,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< false // inverted controls
<< 1 // wheel scroll lines
<< false // with modifiers
- << 2 // delta
+ << -2 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 100 // expected position after
@@ -796,7 +796,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< false // inverted controls
<< 1 // wheel scroll lines
<< false // with modifiers
- << -2 // delta
+ << 2 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 0 // expected position after
@@ -810,7 +810,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< false // inverted controls
<< 20 // wheel scroll lines
<< true // with modifiers
- << 1 // delta
+ << -1 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 90 // expected position after