QByteArray encodedData;
QDataStream stream( &encodedData, QIODevice::WriteOnly );
- foreach( QModelIndex index, indexes ) {
+ foreach( const QModelIndex &index, indexes ) {
if( index.isValid() && index.column() == 0 )
stream << itemId( index );
}
assert( rootItem );
/* Recreate from root */
UpdateNodeChildren( rootItem );
- if( p_item=playlist_CurrentPlayingItem(p_playlist) )
+ if( (p_item = playlist_CurrentPlayingItem(p_playlist)) )
{
PLItem *currentItem = FindByInput( rootItem,
p_item->p_input->i_id );
int i_index = -1;
int i_flag = 0;
- // FIXME: Disable sorting on startup by ignoring
- // first call of sorting caused by showing dialog
- // see: standardpanel.cpp:65
- static bool b_first_time = true;
- if( b_first_time )
- {
- b_first_time = false;
- return;
- }
-
int i_column = 1;
for( i_column = 1; i_column != COLUMN_END; i_column<<=1 )
{
PL_UNLOCK;
current_selection = list;
QMenu *menu = new QMenu;
- menu->addAction( qfu(I_POP_PLAY), this, SLOT( popupPlay() ) );
- menu->addAction( qfu(I_POP_DEL), this, SLOT( popupDel() ) );
+ menu->addAction( qtr(I_POP_PLAY), this, SLOT( popupPlay() ) );
+ menu->addAction( qtr(I_POP_DEL), this, SLOT( popupDel() ) );
menu->addSeparator();
- menu->addAction( qfu(I_POP_STREAM), this, SLOT( popupStream() ) );
- menu->addAction( qfu(I_POP_SAVE), this, SLOT( popupSave() ) );
+ menu->addAction( qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
+ menu->addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
menu->addSeparator();
- menu->addAction( qfu(I_POP_INFO), this, SLOT( popupInfo() ) );
+ menu->addAction( qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
if( p_item->i_children > -1 )
{
menu->addSeparator();
- menu->addAction( qfu(I_POP_SORT), this, SLOT( popupSort() ) );
- menu->addAction( qfu(I_POP_ADD), this, SLOT( popupAdd() ) );
+ menu->addAction( qtr(I_POP_SORT), this, SLOT( popupSort() ) );
+ menu->addAction( qtr(I_POP_ADD), this, SLOT( popupAdd() ) );
}
menu->addSeparator();
- menu->addAction( qfu( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
+ menu->addAction( qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
menu->popup( point );
}
else
{
PLModel *p_model = (PLModel *) param;
PLEvent *event = new PLEvent( PLUpdate_Type, 0 );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
return VLC_SUCCESS;
}
{
PLModel *p_model = (PLModel *) param;
PLEvent *event = new PLEvent( ItemUpdate_Type, oval.i_int );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
event = new PLEvent( ItemUpdate_Type, nval.i_int );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
return VLC_SUCCESS;
}
{
PLModel *p_model = (PLModel *) param;
PLEvent *event = new PLEvent( ItemUpdate_Type, nval.i_int );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
return VLC_SUCCESS;
}
{
PLModel *p_model = (PLModel *) param;
PLEvent *event = new PLEvent( ItemDelete_Type, nval.i_int );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
return VLC_SUCCESS;
}
memcpy( p_add, nval.p_address, sizeof( playlist_add_t ) );
PLEvent *event = new PLEvent( p_add );
- QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
+ QApplication::postEvent( p_model, event );
return VLC_SUCCESS;
}