[vlc-commits] [Git][videolan/vlc][master] Qt: Redundant signal binding
Hugo Beauzée-Luyssen
gitlab at videolan.org
Fri May 21 12:29:51 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
37d8b6f8 by Zou Ya at 2021-05-21T12:12:56+00:00
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.
- - - - -
1 changed file:
- modules/gui/qt/menus/menus.cpp
Changes:
=====================================
modules/gui/qt/menus/menus.cpp
=====================================
@@ -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() );
menu->addSeparator();
@@ -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) );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/37d8b6f802182a2eaf0f2c2d4e4b14a8263edcbf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/37d8b6f802182a2eaf0f2c2d4e4b14a8263edcbf
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list