summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp16
2 files changed, 8 insertions, 11 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp
index 975dec3..2019b3a 100644
--- a/noncore/multimedia/opieplayer2/playlistselection.cpp
+++ b/noncore/multimedia/opieplayer2/playlistselection.cpp
@@ -113,10 +113,9 @@ void PlayListSelection::addToSelection( const DocLnk &lnk ) {
void PlayListSelection::removeSelected() {
QListViewItem *item = selectedItem();
- if ( item )
- delete item;
+ delete item;
setSelected( currentItem(), TRUE );
ensureItemVisible( selectedItem() );
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 86b3424..ac52b07 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -190,9 +190,9 @@ void PlayListWidget::writeDefaultPlaylist() {
while ( d->selectedFiles->next() );
m3uList->write();
m3uList->close();
- if(m3uList) delete m3uList;
+ delete m3uList;
}
}
}
@@ -683,11 +683,9 @@ void PlayListWidget::openFile() {
d->selectedFiles->setSelectedItem( lnk.name());
}
}
- if( fileDlg ) {
- delete fileDlg;
- }
+ delete fileDlg;
}
/*
reads m3u and shows files/urls to playlist widget */
@@ -733,9 +731,9 @@ void PlayListWidget::readm3u( const QString &filename ) {
currentPlayList=filename;
// m3uList->write();
m3uList->close();
- if(m3uList) delete m3uList;
+ delete m3uList;
d->selectedFiles->setSelectedItem( s);
setCaption(tr("OpiePlayer: ")+ QFileInfo(filename).baseName());
@@ -781,9 +779,9 @@ void PlayListWidget::readPls( const QString &filename ) {
d->selectedFiles->addToSelection( lnk );
}
m3uList->close();
- if(m3uList) delete m3uList;
+ delete m3uList;
}
/*
writes current playlist to current m3u file */
@@ -805,9 +803,9 @@ void PlayListWidget::writeCurrentM3u() {
// qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" );
m3uList->write();
m3uList->close();
- if(m3uList) delete m3uList;
+ delete m3uList;
}
}
@@ -841,11 +839,11 @@ void PlayListWidget::writem3u() {
while ( d->selectedFiles->next() );
// qDebug( list );
m3uList->write();
m3uList->close();
- if(m3uList) delete m3uList;
+ delete m3uList;
- if(fileDlg) delete fileDlg;
+ delete fileDlg;
DocLnk lnk;
lnk.setFile( filename);
lnk.setIcon("opieplayer2/playlist2");