summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-20 11:58:03 (UTC)
committer llornkcor <llornkcor>2002-08-20 11:58:03 (UTC)
commitdfd3bcb3dd20cc72487c527d135e076a0ff78b25 (patch) (side-by-side diff)
tree0e26510735ca9c2b65e39e03ab56c77372de8d6a
parentb00ba7b9cdf02a4512f70694e2262ce6e3ebcb98 (diff)
downloadopie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.zip
opie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.tar.gz
opie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.tar.bz2
move configwrite to a better place not in deconstructor
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h2
3 files changed, 3 insertions, 4 deletions
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
@@ -290,10 +290,12 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
// mediaPlayerState->toggleBlank();
break;
}
}
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
@@ -304,15 +304,12 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
initializeStates();
}
PlayListWidget::~PlayListWidget() {
- Config cfg( "OpiePlayer" );
- writeConfig( cfg );
-
if ( d->current ) {
delete d->current;
}
delete d;
}
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
@@ -45,12 +45,13 @@ public:
int selected;
public slots:
bool first();
bool last();
bool next();
bool prev();
+ void writeConfig( Config& cfg ) const;
/* void setFullScreen(); */
/* void setScaled(); */
protected:
/* void contentsMousePressEvent( QMouseEvent * e ); */
/* void contentsMouseReleaseEvent( QMouseEvent * e ); */
void keyReleaseEvent( QKeyEvent *e);
@@ -61,13 +62,12 @@ private:
bool audioScan, videoScan;
void readm3u(const QString &);
void readPls(const QString &);
void initializeStates();
void readConfig( Config& cfg );
- void writeConfig( Config& cfg ) const;
PlayListWidgetPrivate *d; // Private implementation data
void populateAudioView();
void populateVideoView();
private slots:
void populateSkinsMenu();
void skinsMenuActivated(int);