Commit b1cb50d4 authored by Jakob Leben's avatar Jakob Leben

qt4: fix typo + cosmetics

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