]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/standardpanel.cpp
Qt: rename playlist root* functions and getters for clarity
[vlc] / modules / gui / qt4 / components / playlist / standardpanel.cpp
index 63612eba2d5eb86f704503e82e5141c373bda790..9ae14e96afc8cb63ba8d05df4d783362edd75308 100644 (file)
@@ -48,7 +48,6 @@
 #include <QStackedLayout>
 #include <QSignalMapper>
 #include <QSettings>
-#include <QScrollBar>
 
 #include <assert.h>
 
@@ -83,11 +82,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     DCONNECT( THEMIM, leafBecameParent( int ),
               this, browseInto( int ) );
 
-    CONNECT( model, currentChanged( const QModelIndex& ),
+    CONNECT( model, currentIndexChanged( const QModelIndex& ),
              this, handleExpansion( const QModelIndex& ) );
-    CONNECT( model, rootChanged(), this, browseInto() );
+    CONNECT( model, rootIndexChanged(), this, browseInto() );
 
-    setRoot( p_root, false );
+    setRootItem( p_root, false );
 }
 
 StandardPLPanel::~StandardPLPanel()
@@ -180,7 +179,7 @@ void StandardPLPanel::searchDelayed( const QString& searchText )
 
 /* Set the root of the new Playlist */
 /* This activated by the selector selection */
-void StandardPLPanel::setRoot( playlist_item_t *p_item, bool b )
+void StandardPLPanel::setRootItem( playlist_item_t *p_item, bool b )
 {
 #ifdef MEDIA_LIBRARY
     if( b )
@@ -189,6 +188,8 @@ void StandardPLPanel::setRoot( playlist_item_t *p_item, bool b )
         currentView->setModel( mlmodel );
     }
     else
+#else
+    Q_UNUSED( b );
 #endif
     {
         msg_Dbg( p_intf, "Normal PL/ML or SD" );
@@ -352,6 +353,7 @@ void StandardPLPanel::changeModel( bool b_ml )
     if( currentView->model() != mod )
         currentView->setModel( mod );
 #else
+    Q_UNUSED( b_ml );
     if( currentView->model() != model )
         currentView->setModel( model );
 #endif
@@ -412,12 +414,6 @@ int StandardPLPanel::currentViewIndex() const
         return PICTUREFLOW_VIEW;
 }
 
-int StandardPLPanel::getScrollBarsSize() const
-{
-    /* FIXME: should return a set in case of different widths */
-    return currentView->verticalScrollBar()->sizeHint().width();
-}
-
 void StandardPLPanel::cycleViews()
 {
     if( currentView == iconView )
@@ -425,8 +421,10 @@ void StandardPLPanel::cycleViews()
     else if( currentView == treeView )
         showView( LIST_VIEW );
     else if( currentView == listView )
+#ifndef NDEBUG
         showView( PICTUREFLOW_VIEW  );
     else if( currentView == picFlowView )
+#endif
         showView( ICON_VIEW );
     else
         assert( 0 );