Hello folks,<br><br><br>There is a problem with appletRemoved public signal in containment. Here is the signature :<br><br>/**<br>&nbsp;* This signal is emitted when an applet is destroyed<br>&nbsp;*/<br>&nbsp;void appletRemoved(Plasma::Applet *applet);<br>
<br>So a containment that is connected to this signal expect an Applet pointer. But who emit this signal? Our beloved base class Containment which is connected to the QObject destroyed signal of the applet.<br><br>Here is the slot :<br>
void ContainmentPrivate::appletDestroyed(QObject *object);<br><br>When we arrive in the this slot applet destructor has been already called. Since we do a static_cast just because we need the value of the pointer, it&#39;s ok. BUT after we call :<br>
<br>emit q-&gt;appletRemoved(applet); with the pointer we get after the static_cast. <br><br>Aie aie aie. Valgrind complain and we never know, people can use the pointer to do some stuff when they get the appletRemoved signal, (we already do that in our panel.cpp class). Luckily it doesn&#39;t crash but it can happen.<br>
<br>I have attach a patch that create a appletDestroyed signal that is emit just after entering in Applet destructor. I wanted to use destroyed but we have already a method called like this.<br><br>I guess if people agreed that i should backport it to 4.2 branch.<br>
<br>Is it OK?<br><br>PS : Sorry for don&#39;t using the review board but it doesn&#39;t work with git, i don&#39;t have the svn revision.<br>