D25364: KNumberModel: gracefully handle a stepSize of 0
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon Nov 18 09:35:43 GMT 2019
kossebau created this revision.
kossebau added reviewers: Frameworks, davidedmundson, vkrause.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kossebau requested review of this revision.
REVISION 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.
REPOSITORY
R275 KItemModels
BRANCH
knumbermodelhandlestepsizezero
REVISION DETAIL
https://phabricator.kde.org/D25364
AFFECTED FILES
src/core/knumbermodel.cpp
To: kossebau, #frameworks, davidedmundson, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191118/c98b979e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list