[vlc-devel] commit: Qt4: cleanup ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Mar 17 18:50:25 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 17 19:12:31 2009 +0200| [22a10cf39215202a5e1ed64b79fbbdd7242836b7] | committer: Rémi Denis-Courmont
Qt4: cleanup
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22a10cf39215202a5e1ed64b79fbbdd7242836b7
---
modules/gui/qt4/menus.cpp | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 8863a4d..1edb368 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -877,21 +877,18 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
/* Main Menu that sticks everything together */
void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{
- /* Destroy popup menu if there is one */
+ /* Delete old popup if there is one */
+ if( p_intf->p_sys->p_popup_menu )
+ delete p_intf->p_sys->p_popup_menu;
+
if( !show )
{
- delete p_intf->p_sys->p_popup_menu;
p_intf->p_sys->p_popup_menu = NULL;
return;
}
- /* Delete and recreate a popup if there is one */
- if( p_intf->p_sys->p_popup_menu )
- delete p_intf->p_sys->p_popup_menu;
-
/* */
QMenu *menu = new QMenu();
- QMenu *submenu;
QAction *action;
bool b_isFullscreen = false;
MainInterface *mi = p_intf->p_sys->p_mi;
@@ -904,6 +901,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
if( p_input )
{
+ QMenu *submenu;
vout_thread_t *p_vout = THEMIM->getVout();
/* Add a fullscreen switch button, since it is the most used function */
@@ -951,7 +949,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
/* Add some special entries for windowed mode: Interface Menu */
if( !b_isFullscreen )
{
- submenu = new QMenu( qtr( "Interface" ), menu );
+ QMenu *submenu = new QMenu( qtr( "Interface" ), menu );
QMenu *tools = ToolsMenu( submenu );
submenu->addSeparator();
More information about the vlc-devel
mailing list