From: RĂ©mi Duraffort Date: Tue, 26 Feb 2008 22:36:15 +0000 (+0000) Subject: Coding convention X-Git-Tag: 0.9.0-test0~2470 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=94fa96018ffc8402a6d6813ba93245a3d852a54b;p=vlc Coding convention --- diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 9709a4c14e..46ffe0aa71 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -796,52 +796,52 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list ) void PLModel::viewchanged( int meta ) { - if( rootItem ) - { - int index=0; - switch( meta ) - { - case VLC_META_ENGINE_TITLE: - index=0; break; - case VLC_META_ENGINE_DURATION: - index=1; break; - case VLC_META_ENGINE_ARTIST: - index=2; break; - case VLC_META_ENGINE_GENRE: - index=3; break; - case VLC_META_ENGINE_COPYRIGHT: - index=4; break; - case VLC_META_ENGINE_COLLECTION: - index=5; break; - case VLC_META_ENGINE_SEQ_NUM: - index=6; break; - case VLC_META_ENGINE_DESCRIPTION: - index=7; break; - default: - break; - } - /* UNUSED emit layoutAboutToBeChanged(); */ - index = __MIN( index , rootItem->item_col_strings.count() ); - QModelIndex parent = createIndex( 0, 0, rootItem ); - - if( rootItem->i_showflags & meta ) - /* Removing columns */ - { - beginRemoveColumns( parent, index, index+1 ); - rootItem->i_showflags &= ~( meta ); - rootItem->updateColumnHeaders(); - endRemoveColumns(); - } - else - { - /* Adding columns */ - beginInsertColumns( createIndex( 0, 0, rootItem), index, index+1 ); - rootItem->i_showflags |= meta; - rootItem->updateColumnHeaders(); - endInsertColumns(); - } - rebuild(); - } + if( rootItem ) + { + int index=0; + switch( meta ) + { + case VLC_META_ENGINE_TITLE: + index=0; break; + case VLC_META_ENGINE_DURATION: + index=1; break; + case VLC_META_ENGINE_ARTIST: + index=2; break; + case VLC_META_ENGINE_GENRE: + index=3; break; + case VLC_META_ENGINE_COPYRIGHT: + index=4; break; + case VLC_META_ENGINE_COLLECTION: + index=5; break; + case VLC_META_ENGINE_SEQ_NUM: + index=6; break; + case VLC_META_ENGINE_DESCRIPTION: + index=7; break; + default: + break; + } + /* UNUSED emit layoutAboutToBeChanged(); */ + index = __MIN( index, rootItem->item_col_strings.count() ); + QModelIndex parent = createIndex( 0, 0, rootItem ); + + if( rootItem->i_showflags & meta ) + /* Removing columns */ + { + beginRemoveColumns( parent, index, index+1 ); + rootItem->i_showflags &= ~( meta ); + rootItem->updateColumnHeaders(); + endRemoveColumns(); + } + else + { + /* Adding columns */ + beginInsertColumns( createIndex( 0, 0, rootItem), index, index+1 ); + rootItem->i_showflags |= meta; + rootItem->updateColumnHeaders(); + endInsertColumns(); + } + rebuild(); + } } void PLModel::popupDel()