KNumberModel: gracefully handle a stepSize of 0

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

Description

KNumberModel: gracefully handle a stepSize of 0

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.

Reviewers: Frameworks, davidedmundson, vkrause

Reviewed By: davidedmundson

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D25364

Details

Committed
kossebauNov 18 2019, 10:38 AM
Reviewer
davidedmundson
Differential Revision
D25364: KNumberModel: gracefully handle a stepSize of 0
Parents
R275:6b05ca4afbda: Duplicate QML installation for unit tests
Branches
Unknown
Tags
Unknown