KNumberModel: gracefully handle a stepSize of 0
ClosedPublic

Authored by kossebau on Nov 18 2019, 9:35 AM.

Details

Summary

While setting a stepSize of 0 is undefined in the API docs, Qt widgets with
similar step properties gracefully handle also a value of 0.
The current Q_ASSERT only catches any 0 value in respective debug builds,
but would result in crashing applications in normal builds at runtime due to
the divide-by-zero.

Diff Detail

Repository
R275 KItemModels
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Nov 18 2019, 9:35 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 18 2019, 9:35 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Nov 18 2019, 9:35 AM
davidedmundson accepted this revision.Nov 18 2019, 9:40 AM
This revision is now accepted and ready to land.Nov 18 2019, 9:40 AM
This revision was automatically updated to reflect the committed changes.