From dfd3bcb3dd20cc72487c527d135e076a0ff78b25 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 20 Aug 2002 11:58:03 +0000 Subject: move configwrite to a better place not in deconstructor --- diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 6a48b82..0526c2a 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -293,6 +293,8 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { } void MediaPlayer::cleanUp() {// this happens on closing + Config cfg( "OpiePlayer" ); + playList->writeConfig( cfg ); // QPEApplication::grabKeyboard(); // QPEApplication::ungrabKeyboard(); diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 404e1fe..bc9b166 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -307,9 +307,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) PlayListWidget::~PlayListWidget() { - Config cfg( "OpiePlayer" ); - writeConfig( cfg ); - if ( d->current ) { delete d->current; } diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 8076707..8710a99 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h @@ -48,6 +48,7 @@ public slots: bool last(); bool next(); bool prev(); + void writeConfig( Config& cfg ) const; /* void setFullScreen(); */ /* void setScaled(); */ protected: @@ -64,7 +65,6 @@ private: void initializeStates(); void readConfig( Config& cfg ); - void writeConfig( Config& cfg ) const; PlayListWidgetPrivate *d; // Private implementation data void populateAudioView(); void populateVideoView(); -- cgit v0.9.0.2