-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index a708cf6..92da73b 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -789,6 +789,15 @@ void PlayListWidget::populateVideoView() { videoPopulated=true; } +QListView *PlayListWidget::currentFileListView() const +{ + switch ( currentTab() ) { + case AudioFiles: return audioView; + case VideoFiles: return videoView; + default: assert( false ); + } + return 0; +} void PlayListWidget::openFile() { // http://66.28.164.33:2080 @@ -1153,12 +1162,5 @@ PlayListWidget::TabType PlayListWidget::currentTab() const } QString PlayListWidget::currentFileListPathName() const { - switch (currentTab()) { - case AudioFiles: - return audioView->currentItem()->text(3); - case VideoFiles: - return videoView->currentItem()->text(3); - default: assert( false ); - }; - return QString::null; + return currentFileListView()->currentItem()->text( 3 ); } diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 7044abe..a608eae 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h @@ -90,6 +90,8 @@ private: void populateAudioView(); void populateVideoView(); + QListView *currentFileListView() const; + private slots: void populateSkinsMenu(); void skinsMenuActivated(int); |