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

Commit Hook null at kde.org
Fri Mar 8 00:51:15 GMT 2013


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


This review has been submitted with commit 9a1f896b23c2d77b450c6930ceaee617c42d3ad3 by Arjen Hiemstra to branch master.

- Commit Hook


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/20130308/4da2f4da/attachment.htm>


More information about the calligra-devel mailing list