Commit 37d8b6f8 authored by ya zou's avatar ya zou Committed by Hugo Beauzée-Luyssen
Browse files

Qt: Redundant signal binding

The signal slot binding here is redundant, because every time
the menu is created, the value is obtained from MainInterface,
and there is no need to set it again through the signal.
parent 2550346b
......@@ -344,14 +344,12 @@ QMenu *VLCMenuBar::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterfac
action->setCheckable( true );
connect( action, &QAction::triggered, mi, &MainInterface::setPlaylistVisible );
action->setChecked( mi->isPlaylistVisible() );
connect( mi, &MainInterface::playlistVisibleChanged,
action, &QAction::setChecked );
/* Docked Playlist */
action = menu->addAction( qtr( "Docked Playlist" ) );
action->setCheckable( true );
connect( action, &QAction::triggered, mi, &MainInterface::setPlaylistDocked );
action->setChecked( mi->isPlaylistDocked() );
......@@ -367,15 +365,11 @@ QMenu *VLCMenuBar::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterfac
&MainInterface::toggleInterfaceFullScreen, QString( "F11" ) );
action->setCheckable( true );
action->setChecked( mi->isInterfaceFullScreen() );
connect( mi, &MainInterface::fullscreenInterfaceToggled,
action, &QAction::setChecked );
action = menu->addAction( qtr( "&View Items as Grid" ), mi,
&MainInterface::setGridView );
action->setCheckable( true );
action->setChecked( mi->hasGridView() );
connect( mi, &MainInterface::gridViewChanged,
action, &QAction::setChecked );
menu->addMenu( new CheckableListMenu(qtr( "&Color Scheme" ), mi->getColorScheme(), CheckableListMenu::GROUPED, current) );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment