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

Jakob Leben jakob.leben at gmail.com
Wed Apr 7 16:15:05 CEST 2010


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100407/a1e15131/attachment.html>


More information about the vlc-devel mailing list