-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 11a7b5c..a708cf6 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -425,9 +425,8 @@ void PlayListWidget::useSelectedDocument() { const DocLnk *PlayListWidget::current() { // this is fugly - switch ( whichList() ) { - case 0: //playlist - { + assert( currentTab() == CurrentPlayList ); + // qDebug("playlist"); if ( mediaPlayerState->isUsingPlaylist() ) { return d->selectedFiles->current(); @@ -437,10 +436,6 @@ const DocLnk *PlayListWidget::current() { // this is fugly return &(d->files->selectedDocument()); } } - break; - }; - return 0; -} bool PlayListWidget::prev() { @@ -1158,13 +1153,12 @@ PlayListWidget::TabType PlayListWidget::currentTab() const } QString PlayListWidget::currentFileListPathName() const { - switch (whichList()) { - case 1: + switch (currentTab()) { + case AudioFiles: return audioView->currentItem()->text(3); - break; - case 2: + case VideoFiles: return videoView->currentItem()->text(3); - break; + default: assert( false ); }; - return ""; + return QString::null; } |