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

Aurélien Gâteau agateau at kde.org
Fri Dec 21 16:39:49 GMT 2012


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

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/20121221/40966c2b/attachment.htm>


More information about the kde-core-devel mailing list