Robin Getz
bdf0fa0202
valuedialz: Fix signed/unsigned conversion when editing negative values
...
Fix a signed/unsigned arithmetic issue in ValueDialZ::keyPressEvent()
reported by cppcheck.
The digit editing code used quint64 intermediates together with a signed
sign value:
int sign = m_value < 0 ? -1 : 1;
setValue(sign * v);
When editing negative values, the signed -1 was converted to an unsigned
value before multiplication, causing the result to wrap instead of
producing a negative value.
Use qint64 intermediates for the digit manipulation and apply the existing
sign explicitly when updating the value. This preserves correct behavior
when editing negative values and avoids the unintended unsigned conversion.
Signed-off-by: Robin Getz <rgetz503@gmail.com >
2026-08-01 18:05:44 -04:00
f4exb
b84eea7dc9
Rewriting of copyright notices for sdrgui. Fixes #1893
2023-11-19 13:43:10 +01:00
srcejon
1affacbb25
Fix ValueDialZ to allow keyboard entry of first digit when m_positiveOnly
2023-11-02 15:05:44 +00:00
Jon Beniston
7ae1951d12
Add accessibility interface for ValueDial widgets, so they work with screen readers. For #1672
2023-04-28 15:58:57 +01:00
Jon Beniston
e5c887646a
Allow Android virtual keyboard to change sign in ValueDialZ widget
2022-12-20 09:55:22 +00:00
Jon Beniston
2cb2a8d555
Update sdrbase and sdrgui to support Qt5 and Qt6
2022-11-17 14:41:55 +00:00
Jiří Pinkava
a9f1c072d9
Replace deprecated QWheelEvent.pos by position
2022-09-24 21:20:56 +02:00
Jiří Pinkava
c29d3b6433
Replace deprecated QWheelEvent.delta by angleDelta
2022-09-24 20:23:28 +02:00
Jon Beniston
d17403f8e9
Darken ValueDials when disabled
2022-07-08 22:12:20 +01:00
Jon Beniston
33c19b6fe0
Value dial: Check for completed animation before using m_value
2022-06-23 16:26:27 +01:00
f4exb
8f48e987fa
Massive UI revamping (v7): correct ValueDialZ incorrectly zeroing on set value range
2022-04-18 05:25:31 +02:00
f4exb
22381c5dbc
ValueDialZ: fix find exponent. Fixes #1158
2022-03-03 23:23:54 +01:00
f4exb
22604244a3
ValueDialZ: fixed compilation warning. Fixes #1155
2022-02-20 23:02:42 +01:00
f4exb
5df47b405a
ValueDialZ: added decimal point option
2022-02-05 23:40:23 +01:00
f4exb
3641eb7295
ValueDialZ: when setting range fix zero display initial value
2021-10-12 23:12:53 +02:00
Jon Beniston
e248d8144c
valuedialz: Check range against m_valueNew rather than m_value, as that holds the most recently set value
2021-10-05 14:20:05 +01:00
f4exb
f693ecc8cc
ValueDialZ: moved emit changed inside setValue method. Complements #1004
2021-10-03 12:53:14 +02:00
f4exb
40a1c854dd
ValueDialZ: removed set value to 0 code if value is in range. Fixes #1004
2021-10-03 12:45:32 +02:00
f4exb
379096cbdd
Migrate code to Qt 5.14.2
2020-11-04 20:08:44 +01:00
Vort
73b221f055
ValueDial(Z): add virtual keyboard support
2020-08-12 13:26:49 +03:00
f4exb
8488161e6d
Fixed incomplete copyright headers (4): sdrgui
2019-04-11 14:43:33 +02:00
f4exb
f5357e9917
PVS-Studio Analysis corrections for less serious issues
2018-11-18 11:06:41 +01:00
f4exb
4bb63bbf1b
Fixed keyboard input for negative values on realtive integer value dials (issue #168 )
2018-05-08 10:10:15 +02:00
f4exb
2b846f5d28
PVS-Studio static analysis corrections (2) issue #137
2018-02-22 03:04:42 +01:00
fire
30111bdca0
fix QtWheelEvent propagation
...
as described here
http://www.setnode.com/blog/mouse-wheel-events-event-filters-and-qscrollarea/
2018-02-12 01:43:04 +01:00
f4exb
382a825614
Fixed value dial typing in values problems. Issue #97
2017-11-18 03:51:46 +01:00
f4exb
641dbf9744
Value dials: use the locale group separator for thousands
2017-11-05 13:05:21 +01:00
f4exb
fa77ca3fb6
Code re-organization in two libraries sdrbase and sdrgui in view of core / GUI split
2017-10-22 19:12:43 +02:00