Marc Mutz 4b20e23ed7 QAbstractSlider: fix missing "emission" of SliderOrientationChange
QAbstractSlider::sliderChange() is not a signal, but a protected
function, carrying an enum (also protected) to inform subclasses about
changes in the base class.

A user reported (QTBUG-135597) that in 5.15 the function was not
called for SliderOrientationChange. A prior test addition confirmed
that this bug is in all active branches.

Add the missing call in setOrientation().

This _should_ replace the update() call, because the default
sliderChange() implementation already calls it (and setPageStep(),
e.g., relies on this behavior), but since SliderOrientationChange was
not emitted since Qt 5.0, I minimize regression risks and keep the
update() call, just in case a user wrote code where they forgot to
call Base::sliderChange() for SliderOrientationChange (and this never
showed because we never "emitted" that, up to now). The duplicate
update() calls will be merged by Qt's event loop, so are harmless.

A dev-only follow-up change will remove the update().

[ChangeLog][QtWidgets][QAbstractSlider] Fixed the missing "emission"
of protected sliderChange(SliderOrientationChange).

Amends the start of the public history.

Pick-to: 6.8 6.5 5.15
Fixes: QTBUG-135597
Change-Id: I4545d47d315a98a9a51134901a00fa369f720754
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c35f6851bfe8ba71c26d3896498c1510fcd4e42b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-04-17 11:31:23 +00:00
..