Am 23.05.2011 um 23:14 schrieb Jean-Marc Lasgouttes:

> Le 23/05/2011 22:22, Stephan Witt a écrit :
>> The menu code is written twice in Qt - one version for Carbon, another one 
>> for Cocoa.
>> Very likely they behave different.
>> It looks like the Cocoa implementation adds the Reconfigure menu for every 
>> GuiView instance...
>> And the other special menu items are not affected.
> 
> Yes, I have seen this too.
> 
>> I made another hack on top of the mac menu hacks. Please, find it attached.
>> JMarc, can you say something about this patch, please?
>> Here it works for me. But don't ask me why.
> 
> It does not look too wrong, but I do not have the code really in mind. Did 
> you see in the Qt where the problem is.

I tried to follow the two code paths (Carbon and Cocoa). But I failed to see 
the possible cause. Perhaps it's on a deeper layer...
Obviously one should have only one Quit, About or Preference menu item. OTOH, 
multiple ApplicationSpecificRole items make sense.
So one can say it is a bug to have only one Reconfigure item for multiple 
addAction() calls. 
And now this is fixed by using Cocoa and we are bitten by this.

I don't understand why it did not work to call the addAction() only once at 
all. The About and Preferences items stay disabled then.
I'll try to understand this, possibly it is our failure and in the second call 
of macxMenuBarInit() we should enable the items instead of creating them 
(again).

Stephan

> It would be nice to determine whether the bug is in qt or in our code 
> (because if qt is fixed, we may again have a bug...).
> 
> JMarc

Reply via email to