author | simon <simon> | 2002-12-02 14:47:45 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 14:47:45 (UTC) |
commit | 3644bde7c86013c699978446c29ec6502220e29c (patch) (unidiff) | |
tree | b3c1df324e8f3051d0b54fdb3e5e7e4904fbde4a | |
parent | 46d64cdfe9a3d949e91ea6a72828405d03337225 (diff) | |
download | opie-3644bde7c86013c699978446c29ec6502220e29c.zip opie-3644bde7c86013c699978446c29ec6502220e29c.tar.gz opie-3644bde7c86013c699978446c29ec6502220e29c.tar.bz2 |
- more whichList usage removed
-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() { | |||
425 | 425 | ||
426 | 426 | ||
427 | const DocLnk *PlayListWidget::current() { // this is fugly | 427 | const DocLnk *PlayListWidget::current() { // this is fugly |
428 | switch ( whichList() ) { | 428 | assert( currentTab() == CurrentPlayList ); |
429 | case 0: //playlist | 429 | |
430 | { | ||
431 | // qDebug("playlist"); | 430 | // qDebug("playlist"); |
432 | if ( mediaPlayerState->isUsingPlaylist() ) { | 431 | if ( mediaPlayerState->isUsingPlaylist() ) { |
433 | return d->selectedFiles->current(); | 432 | return d->selectedFiles->current(); |
@@ -437,10 +436,6 @@ const DocLnk *PlayListWidget::current() { // this is fugly | |||
437 | return &(d->files->selectedDocument()); | 436 | return &(d->files->selectedDocument()); |
438 | } | 437 | } |
439 | } | 438 | } |
440 | break; | ||
441 | }; | ||
442 | return 0; | ||
443 | } | ||
444 | 439 | ||
445 | 440 | ||
446 | bool PlayListWidget::prev() { | 441 | bool PlayListWidget::prev() { |
@@ -1158,13 +1153,12 @@ PlayListWidget::TabType PlayListWidget::currentTab() const | |||
1158 | } | 1153 | } |
1159 | 1154 | ||
1160 | QString PlayListWidget::currentFileListPathName() const { | 1155 | QString PlayListWidget::currentFileListPathName() const { |
1161 | switch (whichList()) { | 1156 | switch (currentTab()) { |
1162 | case 1: | 1157 | case AudioFiles: |
1163 | return audioView->currentItem()->text(3); | 1158 | return audioView->currentItem()->text(3); |
1164 | break; | 1159 | case VideoFiles: |
1165 | case 2: | ||
1166 | return videoView->currentItem()->text(3); | 1160 | return videoView->currentItem()->text(3); |
1167 | break; | 1161 | default: assert( false ); |
1168 | }; | 1162 | }; |
1169 | return ""; | 1163 | return QString::null; |
1170 | } | 1164 | } |