1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-07 03:16:40 -04:00
Commit Graph

4 Commits

Author SHA1 Message Date
Robin Getz 1253697801 gui: Explicitly call QSlider::setRange in LogSlider constructor
cppcheck identified that LogSlider::LogSlider() calls the derived
setRange(double, double) overload instead of QSlider::setRange(int, int)
due to C++ name hiding.

The constructor's call to:
    setRange(0, 1000);

was therefore invoking the logarithmic range implementation with
min == 0.0, resulting in a call to log10(0). While most callers
immediately replace the initial state by calling LogSlider::setRange()
with a valid positive range, the constructor still performs an invalid
mathematical operation during initialization.

Explicitly qualify the call as QSlider::setRange(0, 1000) to initialize
the underlying slider without invoking the logarithmic overload. This
eliminates the invalid-domain call, avoids undefined behavior from
propagating exceptional floating-point values into the slider state, and
makes the constructor's intent explicit.

This change has no functional impact on normal operation, but removes a
latent initialization bug and prevents future regressions caused by
overload hiding.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-31 20:37:23 -04:00
f4exb b84eea7dc9 Rewriting of copyright notices for sdrgui. Fixes #1893 2023-11-19 13:43:10 +01:00
Jon Beniston 18180bfd52 Fix gcc errors 2023-08-05 12:52:42 +01:00
Jon Beniston 2d7c572040 Rotator Controller: Add additional gamepad calibration and functionality 2023-08-05 12:33:01 +01:00