[vlc-commits] qt: remove postproc menus

Jean-Baptiste Kempf git at videolan.org
Tue May 23 18:32:09 CEST 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue May 23 18:31:36 2017 +0200| [d168693888d27e8d14011c36ecfdabd128dd722a] | committer: Jean-Baptiste Kempf

qt: remove postproc menus

Postproc is almost always useless nowadays and does not work in most
cases.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d168693888d27e8d14011c36ecfdabd128dd722a
---

 modules/gui/qt/actions_manager.cpp            |  9 --------
 modules/gui/qt/actions_manager.hpp            |  1 -
 modules/gui/qt/components/extended_panels.cpp | 27 ----------------------
 modules/gui/qt/components/extended_panels.hpp |  2 --
 modules/gui/qt/menus.cpp                      | 32 ---------------------------
 modules/gui/qt/menus.hpp                      |  2 --
 6 files changed, 73 deletions(-)

diff --git a/modules/gui/qt/actions_manager.cpp b/modules/gui/qt/actions_manager.cpp
index a884ce52c5..4f672da077 100644
--- a/modules/gui/qt/actions_manager.cpp
+++ b/modules/gui/qt/actions_manager.cpp
@@ -209,15 +209,6 @@ void ActionsManager::skipBackward()
         THEMIM->getIM()->jumpBwd();
 }
 
-void ActionsManager::PPaction( QAction *a )
-{
-    int i_q = -1;
-    if( a != NULL )
-        i_q = a->data().toInt();
-
-    ExtVideo::setPostprocessing( p_intf, i_q );
-}
-
 bool ActionsManager::isItemSout( QVariant & m_obj, const char *psz_sout, bool as_output )
 {
     if ( psz_sout == NULL )
diff --git a/modules/gui/qt/actions_manager.hpp b/modules/gui/qt/actions_manager.hpp
index 1f11c8d062..906d677446 100644
--- a/modules/gui/qt/actions_manager.hpp
+++ b/modules/gui/qt/actions_manager.hpp
@@ -91,7 +91,6 @@ public slots:
     void record();
     void skipForward();
     void skipBackward();
-    void PPaction( QAction * );
     void ScanRendererAction( bool );
     void RendererSelected( QAction * );
 
diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index 192696acad..d8c0f514ac 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -620,33 +620,6 @@ void ExtVideo::updateFilterOptions()
     setFilterOption( p_intf, qtu( module ), qtu( option ), i_int, f_float, val);
 }
 
-int ExtVideo::getPostprocessing( struct intf_thread_t *p_intf)
-{
-    char *psz_config = config_GetPsz(p_intf, "video-filter");
-    int i_q = -1;
-    if (psz_config) {
-        if (strstr(psz_config, "postproc"))
-            i_q = config_GetInt(p_intf, "postproc-q");
-        free(psz_config);
-    }
-    return i_q;
-}
-
-void ExtVideo::setPostprocessing( struct intf_thread_t *p_intf, int q)
-{
-    const char *psz_name = "postproc";
-
-    if( q == -1 )
-    {
-        ChangeVFiltersString( p_intf, psz_name, false );
-    }
-    else
-    {
-        ChangeVFiltersString( p_intf, psz_name, false );
-        setFilterOption( p_intf, "postproc", "postproc-q", q, -1, QString() );
-    }
-}
-
 /**********************************************************************
  * v4l2 controls
  **********************************************************************/
diff --git a/modules/gui/qt/components/extended_panels.hpp b/modules/gui/qt/components/extended_panels.hpp
index 1f2292838e..c0b1bf0047 100644
--- a/modules/gui/qt/components/extended_panels.hpp
+++ b/modules/gui/qt/components/extended_panels.hpp
@@ -47,8 +47,6 @@ class ExtVideo: public QObject
     friend class ExtendedDialog;
 public:
     ExtVideo( struct intf_thread_t *, QTabWidget * );
-    static void setPostprocessing( struct intf_thread_t *, int q);
-    static int getPostprocessing( struct intf_thread_t *p_intf);
 private:
     Ui::ExtVideoWidget ui;
     QSignalMapper* filterMapper;
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index d5a7706d52..6395a0a068 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -81,7 +81,6 @@ static QActionGroup *currentGroup;
 
 QMenu *VLCMenuBar::recentsMenu = NULL;
 QMenu *VLCMenuBar::audioDeviceMenu = NULL;
-QMenu *VLCMenuBar::ppMenu = NULL;
 QMenu *VLCMenuBar::rendererMenu = NULL;
 QActionGroup *VLCMenuBar::rendererGroup = NULL;
 
@@ -249,8 +248,6 @@ static int VideoAutoMenuBuilder( playlist_t *pl, input_thread_t *p_input,
     PUSH_VAR( "deinterlace" );
     PUSH_VAR( "deinterlace-mode" );
 
-    VLCMenuBar::ppMenu->setEnabled( p_object != NULL );
-
     if( p_object )
         vlc_object_release( p_object );
     return VLC_SUCCESS;
@@ -690,8 +687,6 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current )
         /* Rendering modifiers */
         addActionWithSubmenu( current, "deinterlace", qtr( "&Deinterlace" ) );
         addActionWithSubmenu( current, "deinterlace-mode", qtr( "&Deinterlace mode" ) );
-        ppMenu = PPMenu( p_intf );
-        current->addMenu( ppMenu );
 
         current->addSeparator();
         /* Other actions */
@@ -1655,30 +1650,3 @@ QMenu *VLCMenuBar::RendererMenu( intf_thread_t *p_intf )
 
     return submenu;
 }
-
-QMenu *VLCMenuBar::PPMenu( intf_thread_t *p_intf )
-{
-    int i_q = ExtVideo::getPostprocessing( p_intf );
-
-    QMenu *submenu = new QMenu( qtr("&Post processing") );
-
-    QActionGroup *actionGroup = new QActionGroup(submenu);
-    QAction *action;
-
-#define ADD_PP_ACTION( text, value ) \
-    action = new QAction( qtr(text), submenu ); \
-    action->setData( value ); \
-    action->setCheckable(true); \
-    if( value == i_q ) action->setChecked( true ); \
-    submenu->addAction( action ); \
-    actionGroup->addAction( action );
-
-    ADD_PP_ACTION( "Disable", -1 );
-    submenu->addSeparator();
-    ADD_PP_ACTION( "Lowest",  1 );
-    ADD_PP_ACTION( "Middle",  3 );
-    ADD_PP_ACTION( "Highest", 6 );
-
-    CONNECT( actionGroup, triggered( QAction *), ActionsManager::getInstance( p_intf ), PPaction( QAction * ) );
-    return submenu;
-}
diff --git a/modules/gui/qt/menus.hpp b/modules/gui/qt/menus.hpp
index 222c2ca39f..16728f54b1 100644
--- a/modules/gui/qt/menus.hpp
+++ b/modules/gui/qt/menus.hpp
@@ -94,7 +94,6 @@ public:
     };
     Q_DECLARE_FLAGS(actionflags, actionflag)
 
-    static QMenu *ppMenu;
     static QMenu *rendererMenu;
     static QActionGroup *rendererGroup;
 
@@ -132,7 +131,6 @@ private:
     }
 
     static QMenu *HelpMenu( QWidget * );
-    static QMenu *PPMenu( intf_thread_t *p_intf );
     static QMenu *RendererMenu( intf_thread_t *p_intf );
 
     /* Popups Menus */



More information about the vlc-commits mailing list