author | llornkcor <llornkcor> | 2002-10-10 01:20:36 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-10 01:20:36 (UTC) |
commit | 2cbc91d6aff15c931426f3c835b5126c7da3ba2b (patch) (side-by-side diff) | |
tree | 65d6cf3c96306ccbb55c44c5d21af3777835b134 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | 41aaa97e19b29f96fced9013a707cc6d16bc2143 (diff) | |
download | opie-2cbc91d6aff15c931426f3c835b5126c7da3ba2b.zip opie-2cbc91d6aff15c931426f3c835b5126c7da3ba2b.tar.gz opie-2cbc91d6aff15c931426f3c835b5126c7da3ba2b.tar.bz2 |
other crash fixes
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index e28efd0..f9192e8 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -187,8 +187,8 @@ void PlayListWidget::writeDefaultPlaylist() { if( currentString == filename) { Om3u *m3uList; // qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>"); + if( d->selectedFiles->first() ) { m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); - d->selectedFiles->first(); do { // qDebug(d->selectedFiles->current()->file()); m3uList->add( d->selectedFiles->current()->file() ); @@ -198,6 +198,8 @@ void PlayListWidget::writeDefaultPlaylist() { m3uList->write(); m3uList->close(); if(m3uList) delete m3uList; + + } } } @@ -853,9 +855,11 @@ void PlayListWidget::writeCurrentM3u() { cfg.setGroup("PlayList"); QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); + if( d->selectedFiles->first()) { Om3u *m3uList; m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); - d->selectedFiles->first(); + + qDebug( d->selectedFiles->current()->file()); do { qDebug( d->selectedFiles->current()->file()); @@ -868,6 +872,7 @@ void PlayListWidget::writeCurrentM3u() { if(m3uList) delete m3uList; } +} /* writes current playlist to m3u file */ @@ -890,10 +895,9 @@ void PlayListWidget::writem3u() { filename = QPEApplication::documentDir() + "/" +name+".m3u"; } + if( d->selectedFiles->first()) { m3uList = new Om3u(filename, IO_ReadWrite); - d->selectedFiles->first(); - do { m3uList->add( d->selectedFiles->current()->file()); } @@ -923,7 +927,7 @@ void PlayListWidget::writem3u() { setCaption(tr("OpiePlayer: ") + name); } - + } } void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) { |