Review Request: KMessageWidget: Fix infinite recursion triggered from resizeEvent()

Martin Blumenstingl martin.blumenstingl at googlemail.com
Mon Dec 24 10:56:50 GMT 2012


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


Fixes cantata for me (as described in bug 311336).
I could also not find regressions so far.

- Martin Blumenstingl


On Dec. 21, 2012, 4:39 p.m., Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107835/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2012, 4:39 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> When KMessageWidget width is adjusted while it is animating, it tries to resize the snapshot of its content to match the new width. This causes an infinite recursion because updating the snapshot is done with QWidget::render, which in turns activate all the layout of the owning window, which triggers a resizeEvent...
> 
> Attached patch does not resize the snapshot during animation anymore, it just ensures the content is correctly sized at the end of the animation.
> 
> 
> This addresses bug 311336.
>     http://bugs.kde.org/show_bug.cgi?id=311336
> 
> 
> Diffs
> -----
> 
>   kdeui/widgets/kmessagewidget.cpp 481ef49 
> 
> Diff: http://git.reviewboard.kde.org/r/107835/diff/
> 
> 
> Testing
> -------
> 
> Tested with `kate +30 foo` which used to trigger the infinite recursion. Tested with kmessagewidgetdemo and kmessagewidgettest, did not spot any regression.
> 
> 
> Thanks,
> 
> Aurélien Gâteau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20121224/e2cd3370/attachment.htm>


More information about the kde-core-devel mailing list