summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp26
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h3
2 files changed, 12 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index b78ce24..889667c 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -58,3 +58,4 @@
PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
- : PlayListWidgetGui( mediaPlayerState, parent, name ) {
+ : PlayListWidgetGui( mediaPlayerState, parent, name ) , currentFileListView( 0 )
+{
@@ -479,4 +480,3 @@ void PlayListWidget::addSelected() {
- QListView *fileListView = currentFileListView();
- QListViewItemIterator it( fileListView );
+ QListViewItemIterator it( currentFileListView );
for ( ; it.current(); ++it )
@@ -492,3 +492,3 @@ void PlayListWidget::addSelected() {
- fileListView->clearSelection();
+ currentFileListView->clearSelection();
@@ -544,2 +544,4 @@ void PlayListWidget::tabChanged(QWidget *) {
+ currentFileListView = 0;
+
switch ( currentTab() ) {
@@ -570,2 +572,4 @@ void PlayListWidget::tabChanged(QWidget *) {
d->tbPlay->setEnabled( audioView->hasSelection() );
+
+ currentFileListView = audioView;
}
@@ -585,2 +589,4 @@ void PlayListWidget::tabChanged(QWidget *) {
d->tbPlay->setEnabled( videoView->hasSelection() );
+
+ currentFileListView = videoView;
}
@@ -627,12 +633,2 @@ void PlayListWidget::playSelected() {
-QListView *PlayListWidget::currentFileListView() const
-{
- switch ( currentTab() ) {
- case AudioFiles: return audioView;
- case VideoFiles: return videoView;
- default: assert( false );
- }
- return 0;
-}
-
bool PlayListWidget::inFileListMode() const
@@ -1011,3 +1007,3 @@ PlayListWidget::Entry PlayListWidget::currentEntry() const
QString PlayListWidget::currentFileListPathName() const {
- return currentFileListView()->currentItem()->text( 3 );
+ return currentFileListView->currentItem()->text( 3 );
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index 5c8f30c..e8bf211 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -100,4 +100,2 @@ private:
- QListView *currentFileListView() const;
-
bool inFileListMode() const;
@@ -135,2 +133,3 @@ private:
int selected;
+ QListView *currentFileListView;
};