Commit febca287b4b357240246f7149075ee3917f6c20c

Fixes qabstractslider autotest

Fixed a bad merge in the QAbstractSlider::wheelEvent.

Modified an autotest to follow a change in behavior - scrolling with a
horizontal mouse wheel to the "right" means increasing the value.

Reviewed-by: Richard Moe Gustavsen
src/gui/widgets/qabstractslider.cpp
(0 / 2)
  
739739{
740740 Q_D(QAbstractSlider);
741741 e->ignore();
742 if (e->orientation() != d->orientation && !rect().contains(e->pos()))
743 return;
744742 int delta = e->delta();
745743 if (d->scrollByDelta(e->orientation(), e->modifiers(), delta))
746744 e->accept();
tests/auto/qabstractslider/tst_qabstractslider.cpp
(4 / 4)
  
768768 << true // inverted controls
769769 << 20 // wheel scroll lines
770770 << false // with modifiers
771 << 1 // delta
771 << -1 // delta
772772 << int(Qt::Horizontal) // orientation of slider
773773 << int(Qt::Horizontal) // orientation of wheel
774774 << 30 // expected position after
782782 << false // inverted controls
783783 << 1 // wheel scroll lines
784784 << false // with modifiers
785 << 2 // delta
785 << -2 // delta
786786 << int(Qt::Horizontal) // orientation of slider
787787 << int(Qt::Horizontal) // orientation of wheel
788788 << 100 // expected position after
796796 << false // inverted controls
797797 << 1 // wheel scroll lines
798798 << false // with modifiers
799 << -2 // delta
799 << 2 // delta
800800 << int(Qt::Horizontal) // orientation of slider
801801 << int(Qt::Horizontal) // orientation of wheel
802802 << 0 // expected position after
810810 << false // inverted controls
811811 << 20 // wheel scroll lines
812812 << true // with modifiers
813 << 1 // delta
813 << -1 // delta
814814 << int(Qt::Horizontal) // orientation of slider
815815 << int(Qt::Horizontal) // orientation of wheel
816816 << 90 // expected position after

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment