-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 58c3966..430aa6b 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -169,34 +169,33 @@ bool PlayListSelection::first() { bool PlayListSelection::last() { QListViewItem *prevItem = NULL; QListViewItem *item = firstChild(); while ( ( item = item->nextSibling() ) ) prevItem = item; if ( prevItem ) setSelected( prevItem, TRUE ); else return FALSE; ensureItemVisible( selectedItem() ); return TRUE; } void PlayListSelection::unSelect() { - QListViewItem *item = selectedItem(); - setSelected( currentItem(), FALSE); + setSelected( currentItem() , FALSE); } void PlayListSelection::writeCurrent( Config& cfg ) { cfg.setGroup("PlayList"); QListViewItem *item = selectedItem(); if ( item ) cfg.writeEntry("current", item->text(0) ); // odebug << item->text(0) << oendl; } void PlayListSelection::setSelectedItem(const QString &strk ) { unSelect(); QListViewItemIterator it( this ); for ( ; it.current(); ++it ) { diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index d85ce50..46aeff2 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -1392,33 +1392,33 @@ void PlayListWidget::populateSkinsMenu() { skinName = fi->fileName(); // odebug << fi->fileName() << oendl; if( skinName != "." && skinName != ".." && skinName !="CVS" ) { item = skinsMenu->insertItem( fi->fileName() ) ; } if( skinName == "default" ) { defaultSkinIndex = item; } if( skinName == skin ) { skinsMenu->setItemChecked( item, TRUE ); } ++it; } } void PlayListWidget::skinsMenuActivated( int item ) { - for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { + for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) { skinsMenu->setItemChecked( i, FALSE ); } skinsMenu->setItemChecked( item, TRUE ); Config cfg( "OpiePlayer" ); cfg.setGroup("Options"); cfg.writeEntry("Skin", skinsMenu->text( item ) ); } void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { // odebug << "qcop message "+msg << oendl; QDataStream stream ( data, IO_ReadOnly ); if ( msg == "play()" ) { //plays current selection btnPlay( true); } else if ( msg == "stop()" ) { mediaPlayerState->setPlaying( false); |