<br><br><div class="gmail_quote">On Fri, Apr 2, 2010 at 10:52 PM, brezhoneg1 <span dir="ltr"><<a href="mailto:brezhoneg1@yahoo.fr">brezhoneg1@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
>Qt: delete unneeded MenuItemData (Jakob Leben<br>
eacddb63e8a5bda42395ee79b5b27db6408] | committer: Jakob Leben<br>
><br>
>Qt: delete unneeded MenuItemData<br>
><br>
<br>
This patch was singled out as the one causing a regression for skins2 (a<br>
user of qt4 menus),<br>
namely skins2 yet again crashing at exit on both win32 and Linux.<br>
<br></blockquote><div><br>I can not reproduce this on Linux (Kubuntu Karmic with Qt 4.6), neither in skins2 nor qt interface, neither by exiting via top-right close button nor via right-click menu. I also don't see anything directly relevant in Valgrind's reports - only some reports in relation exclusively to inside of Qt. Could this be a Qt specific problem? Which version of Qt have you tested on?<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When using qFindChild, are we sure there is a unique direct child for an<br>
action ?<br>
Technically, there could be multiple ones, in which case the one being<br>
deleted<br>
is may still be addressed elsewhere. (qt4 doc seems to say it is<br>
undefined in this case)<br></blockquote><div><br>Whenever a single MenuItemData is created as a child of an action any existing (one) is previously deleted. This happens in the same function, so at any time, an action could logically have only one MenuItemData child.<br>
<br>In the same function, the new MenuItemData is set as mapping for it's parent action on a QSignalMapper, and as there can be only one QObject mapped per action (by Qt's documentation), I suppose that QSignalMapper's reference to the deleted MenuItemData should vanish. Maybe this is not so on an older Qt version. This is also the only possible reference to the deleted MenuItemData that I see.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As a matter of fact, just reverting this patch does solve the problem.<br>
<br>
Was this patch correcting a specific issue or just intended as a<br>
cosmetic ?<br></blockquote><div><br>This patch targeted what I see as a real problem: unnecessary accumulation of memory every time the Video, Audio and Interface menus are rebuilt = shown again.<br><br>Please, check what version of Qt you are using, send valgrind's report if possible, and try the attached patch that might solve the bug.<br>
<br>Best regards,<br><br>Jakob<br></div></div>