Commit 94fa9601 authored by Rémi Duraffort's avatar Rémi Duraffort

Coding convention

parent e61cd9b7
...@@ -796,52 +796,52 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list ) ...@@ -796,52 +796,52 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
void PLModel::viewchanged( int meta ) void PLModel::viewchanged( int meta )
{ {
if( rootItem ) if( rootItem )
{ {
int index=0; int index=0;
switch( meta ) switch( meta )
{ {
case VLC_META_ENGINE_TITLE: case VLC_META_ENGINE_TITLE:
index=0; break; index=0; break;
case VLC_META_ENGINE_DURATION: case VLC_META_ENGINE_DURATION:
index=1; break; index=1; break;
case VLC_META_ENGINE_ARTIST: case VLC_META_ENGINE_ARTIST:
index=2; break; index=2; break;
case VLC_META_ENGINE_GENRE: case VLC_META_ENGINE_GENRE:
index=3; break; index=3; break;
case VLC_META_ENGINE_COPYRIGHT: case VLC_META_ENGINE_COPYRIGHT:
index=4; break; index=4; break;
case VLC_META_ENGINE_COLLECTION: case VLC_META_ENGINE_COLLECTION:
index=5; break; index=5; break;
case VLC_META_ENGINE_SEQ_NUM: case VLC_META_ENGINE_SEQ_NUM:
index=6; break; index=6; break;
case VLC_META_ENGINE_DESCRIPTION: case VLC_META_ENGINE_DESCRIPTION:
index=7; break; index=7; break;
default: default:
break; break;
} }
/* UNUSED emit layoutAboutToBeChanged(); */ /* UNUSED emit layoutAboutToBeChanged(); */
index = __MIN( index , rootItem->item_col_strings.count() ); index = __MIN( index, rootItem->item_col_strings.count() );
QModelIndex parent = createIndex( 0, 0, rootItem ); QModelIndex parent = createIndex( 0, 0, rootItem );
if( rootItem->i_showflags & meta ) if( rootItem->i_showflags & meta )
/* Removing columns */ /* Removing columns */
{ {
beginRemoveColumns( parent, index, index+1 ); beginRemoveColumns( parent, index, index+1 );
rootItem->i_showflags &= ~( meta ); rootItem->i_showflags &= ~( meta );
rootItem->updateColumnHeaders(); rootItem->updateColumnHeaders();
endRemoveColumns(); endRemoveColumns();
} }
else else
{ {
/* Adding columns */ /* Adding columns */
beginInsertColumns( createIndex( 0, 0, rootItem), index, index+1 ); beginInsertColumns( createIndex( 0, 0, rootItem), index, index+1 );
rootItem->i_showflags |= meta; rootItem->i_showflags |= meta;
rootItem->updateColumnHeaders(); rootItem->updateColumnHeaders();
endInsertColumns(); endInsertColumns();
} }
rebuild(); rebuild();
} }
} }
void PLModel::popupDel() void PLModel::popupDel()
......
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