[vlc-devel] [PATCH] -- commit: qt4: Don't create QMenu without parents (Erwan Tulou )

brezhoneg1 brezhoneg1 at yahoo.fr
Wed Apr 7 16:34:29 CEST 2010


   Please find attached a patch that  could be a tradeoff  (since it's feature frozen time ) ....

     - removes p_sys->p_popup_menu
     - add a static local variable in each of the four Popupmenu to guarantee a singleton in terms of QMenu.

     Comments welcome


--- En date de : Mer 7.4.10, Jakob Leben <jakob.leben at gmail.com> a écrit :

De: Jakob Leben <jakob.leben at gmail.com>
Objet: Re: [vlc-devel] [vlc-commits] commit: qt4: Don't create QMenu without parents (Erwan Tulou )
À: "Mailing list for VLC media player developers" <vlc-devel at videolan.org>
Date: Mercredi 7 avril 2010, 16h15

On Wed, Apr 7, 2010 at 2:36 PM, Francois Cartegnie <fcvlcdev at free.fr> wrote:

Storing ui classes references into the library isn't acceptable.  

- define a QVLCMenu interface

- QVLCMenu inherits singleton

- Each popup menu class inherits QVLCMenu (insuring only 1 instance)

- New instance deletes old menu instance (with care of slicing), or recycle

To simply implement "singleton" popup menus we don't really need that the whole QVLCMenu inherits singleton. (Note that there is no need to actually get a reference to an instance
of a popup menu. It suffices to call a function that pops the menu up.)

The p_popup_menu right now is effectively a singleton design. In the light of your remarks, we just move p_popup_menu to QVLCMenu, as it's static member.

-----La pièce jointe associée suit-----

vlc-devel mailing list
To unsubscribe or modify your subscription options:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100407/aeb2345c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-qt4-reimplement-p_popup_menu-to-really-prevent-acc.patch
Type: text/x-diff
Size: 5476 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100407/aeb2345c/attachment.patch>

More information about the vlc-devel mailing list