-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index cc4be23..c0d3108 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -499,3 +499,3 @@ void PlayListWidget::addToSelection( QListViewItem *it) { d->setDocumentUsed = FALSE; - qDebug("addToSelection2"); + if(it) { @@ -725,8 +725,3 @@ void PlayListWidget::openFile() { - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile); - m3uList = new Om3u( cfg.readEntry("CurrentPlaylist",""), IO_Append | IO_ReadWrite ); - m3uList->add( filename); - m3uList->write(); - m3uList->close(); - if(m3uList) delete m3uList; +// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile); lnk.setName( filename ); //sets name @@ -735,2 +730,3 @@ void PlayListWidget::openFile() { d->selectedFiles->addToSelection( lnk ); + writeCurrentM3u(); } @@ -741,10 +737,5 @@ void PlayListWidget::openFile() { readPls( filename ); - } - else { - m3uList = new Om3u( cfg.readEntry("CurrentPlaylist",""), IO_Append | IO_ReadWrite ); - m3uList->add( filename); - m3uList->write(); - m3uList->close(); - if(m3uList) delete m3uList; + } else { d->selectedFiles->addToSelection( DocLnk(filename) ); + writeCurrentM3u(); } @@ -851,3 +842,3 @@ void PlayListWidget::readPls( const QString &filename ) { void PlayListWidget::writeCurrentM3u() { - qDebug("writting to current m3u"); + qDebug("writing to current m3u"); Config cfg( "OpiePlayer" ); @@ -882,3 +873,3 @@ void PlayListWidget::writem3u() { name = fileDlg->text(); - qDebug( filename ); +// qDebug( filename ); |