Review Request 109140: Prevent infinte recursion in PictureShape/SelectionRect due to floating-point errors

C. Boemann cbr at boemann.dk
Mon Feb 25 21:18:38 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109140/#review28078
-----------------------------------------------------------

Ship it!


looks good

- C. Boemann


On Feb. 25, 2013, 12:14 p.m., Arjen Hiemstra wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109140/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2013, 12:14 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> SelectionRect::fixAspect recurses when the values of the rect don't exceed those of the borders. However, this can cause an infinite recursion when floating point errors occur, due to (for example) rect.top() being 10.0000000001 which is larger than 10. This patch uses qFuzzyCompare to check for minor floating point errors before recursing.
> 
> 
> Diffs
> -----
> 
>   plugins/pictureshape/SelectionRect.cpp c3a9a2d 
> 
> Diff: http://git.reviewboard.kde.org/r/109140/diff/
> 
> 
> Testing
> -------
> 
> Compiled and run. Cropping on image rect still works.
> 
> 
> Thanks,
> 
> Arjen Hiemstra
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130225/07b66dd1/attachment.htm>


More information about the calligra-devel mailing list