]> git.sesse.net Git - vlc/commitdiff
qt4: fix typo + cosmetics
authorJakob Leben <jleben@videolan.org>
Sun, 23 Aug 2009 14:43:19 +0000 (16:43 +0200)
committerJakob Leben <jleben@videolan.org>
Sun, 23 Aug 2009 14:43:19 +0000 (16:43 +0200)
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/standardpanel.cpp

index 77b8dd13e8840ee979319986e7cce46bd49c9b0d..52cfc76c7c9f3df6b818d84ed3d7016caf6c05ed 100644 (file)
@@ -649,7 +649,7 @@ meta_col must be contained in shown_flags!
 */
 int PLModel::columnFromMeta( int meta_col, int shown_flags ) const
 {
-    assert( meta & shown_flags );
+    assert( meta_col & shown_flags );
 
     int meta = 1;
     int index = -1;
@@ -1044,15 +1044,14 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
     menu->popup( point );
 }
 
-void PLModel::viewchanged( int meta )
+void PLModel::toggleColumnShown( int meta )
 {
     assert( meta );
-    int _meta = meta;
     if( rootItem )
     {
         if( i_showflags & meta )
-            /* Removing columns */
         {
+            /* Removing columns */
             int index = columnFromMeta( meta, i_showflags );
 
             beginRemoveColumns( QModelIndex(), index, index );
@@ -1062,10 +1061,10 @@ void PLModel::viewchanged( int meta )
         }
         else
         {
+            /* Adding columns */
             int sf = i_showflags;
             sf |= meta;
             int index = columnFromMeta( meta, sf );
-            /* Adding columns */
             beginInsertColumns( QModelIndex(), index, index );
             i_showflags = sf;
             getSettings()->setValue( "qt-pl-showflags", i_showflags );
index 3160e57e17436349e978f0219ca5388186cd7cdc..c8d5da078e42e35ea8745d597cfdabe32672c81b 100644 (file)
@@ -201,7 +201,7 @@ private slots:
     void popupAddNode();
     void popupSortAsc();
     void popupSortDesc();
-    void viewchanged( int );
+    void toggleColumnShown( int meta_column );
     void processInputItemUpdate( input_item_t *);
     void processInputItemUpdate( input_thread_t* p_input );
 };
index a12158f9f41abfa4e6d633ad75f0bc4661d30083..18d68863f5f16721cc05ebbbe0b69ca113d6481c 100644 (file)
@@ -323,7 +323,7 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
         CONNECT( option, triggered(), ContextUpdateMapper, map() );
     }
 
-    CONNECT( ContextUpdateMapper, mapped( int ),  model, viewchanged( int ) );
+    CONNECT( ContextUpdateMapper, mapped( int ),  model, toggleColumnShown( int ) );
 
     selectColMenu.exec( QCursor::pos() );
 }