Review Request 128406: KCollapsibleGroupBox: Stop animation if still running in destructor

Kai Uwe Broulik kde at privat.broulik.de
Fri Jul 15 12:09:19 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128406/#review97443
-----------------------------------------------------------




autotests/kcollapsiblegroupbox_test.cpp (line 54)
<https://git.reviewboard.kde.org/r/128406/#comment65744>

    connect(dlg, &QDialog::finished, dlg, &QObject::deleteLater);



src/kcollapsiblegroupbox.cpp (line 67)
<https://git.reviewboard.kde.org/r/128406/#comment65745>

    Too bad we can't use "d" as context object instead of "this", so it would auto-disconnect and this would not have happened.


- Kai Uwe Broulik


On Juli 9, 2016, 11:55 vorm., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128406/
> -----------------------------------------------------------
> 
> (Updated Juli 9, 2016, 11:55 vorm.)
> 
> 
> Review request for KDE Frameworks, David Edmundson and Elvis Angelaccio.
> 
> 
> Repository: kwidgetsaddons
> 
> 
> Description
> -------
> 
> We are using KCollapsibleGroupBox in Ark and stumbled upon a segfault in an autotest involving this widget (see backtrace [here](https://paste.kde.org/pwcohd64z)). It looks like QTimeLine::stop() gets called after KCollapsibleGroupBox is deleted. This causes QTimeLine::stateChanged to get emitted which then calls KCollapsibleGroupBox::updateChildrenVisibility() that causes the crash.
> 
> To see the crash, clone the newAddDialog branch of Ark and run the autotests.
> 
> This diff calls QTimeLine::stop() in the KCollapsibleGroupBox dtor if it is running, before deleting the d pointer.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 4be2eaf 
>   autotests/kcollapsiblegroupbox_test.h PRE-CREATION 
>   autotests/kcollapsiblegroupbox_test.cpp PRE-CREATION 
>   src/kcollapsiblegroupbox.cpp 0c3f866 
> 
> Diff: https://git.reviewboard.kde.org/r/128406/diff/
> 
> 
> Testing
> -------
> 
> The autotests in newAddDialog branch of Ark pass with this diff.
> 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160715/fc2cf2ed/attachment.html>


More information about the Kde-frameworks-devel mailing list