author | simon <simon> | 2002-12-05 19:05:25 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-05 19:05:25 (UTC) |
commit | 4b77aaa27305f0ec120aa6ec4d860f62b7fa7a3f (patch) (unidiff) | |
tree | e4ecf41fafccccd82534df6a1e46115727a9b49c /noncore | |
parent | 05757f4914d19f9c392be1e60e5ec972027886bf (diff) | |
download | opie-4b77aaa27305f0ec120aa6ec4d860f62b7fa7a3f.zip opie-4b77aaa27305f0ec120aa6ec4d860f62b7fa7a3f.tar.gz opie-4b77aaa27305f0ec120aa6ec4d860f62b7fa7a3f.tar.bz2 |
- turned if ( foo ) delete foo; into straight delete foo; as the if is
redundant.
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistselection.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 14 |
2 files changed, 6 insertions, 9 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 | |||
@@ -114,7 +114,6 @@ void PlayListSelection::addToSelection( const DocLnk &lnk ) { | |||
114 | 114 | ||
115 | void PlayListSelection::removeSelected() { | 115 | void PlayListSelection::removeSelected() { |
116 | QListViewItem *item = selectedItem(); | 116 | QListViewItem *item = selectedItem(); |
117 | if ( item ) | ||
118 | delete item; | 117 | delete item; |
119 | setSelected( currentItem(), TRUE ); | 118 | setSelected( currentItem(), TRUE ); |
120 | ensureItemVisible( selectedItem() ); | 119 | 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 | |||
@@ -191,7 +191,7 @@ void PlayListWidget::writeDefaultPlaylist() { | |||
191 | 191 | ||
192 | m3uList->write(); | 192 | m3uList->write(); |
193 | m3uList->close(); | 193 | m3uList->close(); |
194 | if(m3uList) delete m3uList; | 194 | delete m3uList; |
195 | 195 | ||
196 | } | 196 | } |
197 | } | 197 | } |
@@ -684,10 +684,8 @@ void PlayListWidget::openFile() { | |||
684 | } | 684 | } |
685 | } | 685 | } |
686 | 686 | ||
687 | if( fileDlg ) { | ||
688 | delete fileDlg; | 687 | delete fileDlg; |
689 | } | 688 | } |
690 | } | ||
691 | 689 | ||
692 | /* | 690 | /* |
693 | reads m3u and shows files/urls to playlist widget */ | 691 | reads m3u and shows files/urls to playlist widget */ |
@@ -734,7 +732,7 @@ void PlayListWidget::readm3u( const QString &filename ) { | |||
734 | 732 | ||
735 | // m3uList->write(); | 733 | // m3uList->write(); |
736 | m3uList->close(); | 734 | m3uList->close(); |
737 | if(m3uList) delete m3uList; | 735 | delete m3uList; |
738 | 736 | ||
739 | d->selectedFiles->setSelectedItem( s); | 737 | d->selectedFiles->setSelectedItem( s); |
740 | setCaption(tr("OpiePlayer: ")+ QFileInfo(filename).baseName()); | 738 | setCaption(tr("OpiePlayer: ")+ QFileInfo(filename).baseName()); |
@@ -782,7 +780,7 @@ void PlayListWidget::readPls( const QString &filename ) { | |||
782 | } | 780 | } |
783 | 781 | ||
784 | m3uList->close(); | 782 | m3uList->close(); |
785 | if(m3uList) delete m3uList; | 783 | delete m3uList; |
786 | } | 784 | } |
787 | 785 | ||
788 | /* | 786 | /* |
@@ -806,7 +804,7 @@ void PlayListWidget::writeCurrentM3u() { | |||
806 | m3uList->write(); | 804 | m3uList->write(); |
807 | m3uList->close(); | 805 | m3uList->close(); |
808 | 806 | ||
809 | if(m3uList) delete m3uList; | 807 | delete m3uList; |
810 | } | 808 | } |
811 | 809 | ||
812 | } | 810 | } |
@@ -842,9 +840,9 @@ void PlayListWidget::writem3u() { | |||
842 | // qDebug( list ); | 840 | // qDebug( list ); |
843 | m3uList->write(); | 841 | m3uList->write(); |
844 | m3uList->close(); | 842 | m3uList->close(); |
845 | if(m3uList) delete m3uList; | 843 | delete m3uList; |
846 | 844 | ||
847 | if(fileDlg) delete fileDlg; | 845 | delete fileDlg; |
848 | 846 | ||
849 | DocLnk lnk; | 847 | DocLnk lnk; |
850 | lnk.setFile( filename); | 848 | lnk.setFile( filename); |