author | simon <simon> | 2002-12-02 17:10:14 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 17:10:14 (UTC) |
commit | e2e40368d1e98cfd3814e14a56c0e503d494cf4f (patch) (side-by-side diff) | |
tree | 2dc59b9f4e5c5a8cd971934b1dd5976939bbac37 | |
parent | d86803bacac02ae99388cba069532851a5e08ce8 (diff) | |
download | opie-e2e40368d1e98cfd3814e14a56c0e503d494cf4f.zip opie-e2e40368d1e98cfd3814e14a56c0e503d494cf4f.tar.gz opie-e2e40368d1e98cfd3814e14a56c0e503d494cf4f.tar.bz2 |
- removed unused (and never initialized to something != 0)
PlayListWidgetPrivate::current
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 1 |
3 files changed, 1 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 55b66ab..6355bec 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -160,27 +160,24 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) audioPopulated=false; videoPopulated=false; populateSkinsMenu(); initializeStates(); cfg.setGroup("PlayList"); QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); loadList(DocLnk( currentPlaylist ) ); } PlayListWidget::~PlayListWidget() { - if ( d->current ) { - delete d->current; - } delete d; } void PlayListWidget::initializeStates() { d->tbPlay->setOn( mediaPlayerState->isPlaying() ); d->tbLoop->setOn( mediaPlayerState->isLooping() ); d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); setPlaylist( true ); } void PlayListWidget::writeDefaultPlaylist() { @@ -419,28 +416,26 @@ void PlayListWidget::setDocument( const QString& fileref ) { } void PlayListWidget::useSelectedDocument() { d->setDocumentUsed = FALSE; } const DocLnk *PlayListWidget::current() const { // this is fugly assert( currentTab() == CurrentPlayList ); // qDebug("playlist"); - if ( mediaPlayerState->isUsingPlaylist() ) { + if ( mediaPlayerState->isUsingPlaylist() ) return d->selectedFiles->current(); - } else if ( d->setDocumentUsed && d->current ) - return d->current; assert( false ); } bool PlayListWidget::prev() { if ( mediaPlayerState->isUsingPlaylist() ) { if ( mediaPlayerState->isShuffled() ) { const DocLnk *cur = current(); int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); for ( int i = 0; i < j; i++ ) { if ( !d->selectedFiles->next() ) diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index a217c94..db7c979 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp @@ -57,25 +57,24 @@ #include "audiowidget.h" #include "videowidget.h" #include "mediaplayerstate.h" extern MediaPlayerState *mediaPlayerState; PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { d = new PlayListWidgetPrivate; d->setDocumentUsed = FALSE; - d->current = NULL; setBackgroundMode( PaletteButton ); setToolBarsMovable( FALSE ); // Create Toolbar QPEToolBar *toolbar = new QPEToolBar( this ); toolbar->setHorizontalStretchable( TRUE ); // Create Menubar QPEMenuBar *menu = new QPEMenuBar( toolbar ); menu->setMargin( 0 ); diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 6c35771..4eefb93 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h @@ -55,25 +55,24 @@ class QPEToolBar; class QListViewItem; class QListView; class QPoint; class QAction; class QLabel; class PlayListWidgetPrivate { public: QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; QFrame *playListFrame; PlayListSelection *selectedFiles; bool setDocumentUsed; - DocLnk *current; }; class ToolButton : public QToolButton { public: ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) : QToolButton( parent, name ) { setTextLabel( name ); setPixmap( Resource::loadPixmap( icon ) ); setAutoRaise( TRUE ); setFocusPolicy( QWidget::NoFocus ); setToggleButton( t ); |