author | llornkcor <llornkcor> | 2002-08-20 11:58:03 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-20 11:58:03 (UTC) |
commit | dfd3bcb3dd20cc72487c527d135e076a0ff78b25 (patch) (unidiff) | |
tree | 0e26510735ca9c2b65e39e03ab56c77372de8d6a | |
parent | b00ba7b9cdf02a4512f70694e2262ce6e3ebcb98 (diff) | |
download | opie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.zip opie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.tar.gz opie-dfd3bcb3dd20cc72487c527d135e076a0ff78b25.tar.bz2 |
move configwrite to a better place not in deconstructor
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 2 |
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) { | |||
290 | // mediaPlayerState->toggleBlank(); | 290 | // mediaPlayerState->toggleBlank(); |
291 | break; | 291 | break; |
292 | } | 292 | } |
293 | } | 293 | } |
294 | 294 | ||
295 | void MediaPlayer::cleanUp() {// this happens on closing | 295 | void MediaPlayer::cleanUp() {// this happens on closing |
296 | Config cfg( "OpiePlayer" ); | ||
297 | playList->writeConfig( cfg ); | ||
296 | 298 | ||
297 | // QPEApplication::grabKeyboard(); | 299 | // QPEApplication::grabKeyboard(); |
298 | // QPEApplication::ungrabKeyboard(); | 300 | // QPEApplication::ungrabKeyboard(); |
299 | } | 301 | } |
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 ) | |||
304 | 304 | ||
305 | initializeStates(); | 305 | initializeStates(); |
306 | } | 306 | } |
307 | 307 | ||
308 | 308 | ||
309 | PlayListWidget::~PlayListWidget() { | 309 | PlayListWidget::~PlayListWidget() { |
310 | Config cfg( "OpiePlayer" ); | ||
311 | writeConfig( cfg ); | ||
312 | |||
313 | if ( d->current ) { | 310 | if ( d->current ) { |
314 | delete d->current; | 311 | delete d->current; |
315 | } | 312 | } |
316 | delete d; | 313 | delete d; |
317 | } | 314 | } |
318 | 315 | ||
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: | |||
45 | int selected; | 45 | int selected; |
46 | public slots: | 46 | public slots: |
47 | bool first(); | 47 | bool first(); |
48 | bool last(); | 48 | bool last(); |
49 | bool next(); | 49 | bool next(); |
50 | bool prev(); | 50 | bool prev(); |
51 | void writeConfig( Config& cfg ) const; | ||
51 | /* void setFullScreen(); */ | 52 | /* void setFullScreen(); */ |
52 | /* void setScaled(); */ | 53 | /* void setScaled(); */ |
53 | protected: | 54 | protected: |
54 | /* void contentsMousePressEvent( QMouseEvent * e ); */ | 55 | /* void contentsMousePressEvent( QMouseEvent * e ); */ |
55 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ | 56 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ |
56 | void keyReleaseEvent( QKeyEvent *e); | 57 | void keyReleaseEvent( QKeyEvent *e); |
@@ -61,13 +62,12 @@ private: | |||
61 | bool audioScan, videoScan; | 62 | bool audioScan, videoScan; |
62 | void readm3u(const QString &); | 63 | void readm3u(const QString &); |
63 | void readPls(const QString &); | 64 | void readPls(const QString &); |
64 | 65 | ||
65 | void initializeStates(); | 66 | void initializeStates(); |
66 | void readConfig( Config& cfg ); | 67 | void readConfig( Config& cfg ); |
67 | void writeConfig( Config& cfg ) const; | ||
68 | PlayListWidgetPrivate *d; // Private implementation data | 68 | PlayListWidgetPrivate *d; // Private implementation data |
69 | void populateAudioView(); | 69 | void populateAudioView(); |
70 | void populateVideoView(); | 70 | void populateVideoView(); |
71 | private slots: | 71 | private slots: |
72 | void populateSkinsMenu(); | 72 | void populateSkinsMenu(); |
73 | void skinsMenuActivated(int); | 73 | void skinsMenuActivated(int); |