summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-20 12:27:14 (UTC)
committer llornkcor <llornkcor>2002-08-20 12:27:14 (UTC)
commit41fe19a4e2e808d48429c84f4b7dd6b9af797ead (patch) (side-by-side diff)
tree3f9b0c91c34c3d81feebd43e904e74563ba2229c
parentdfd3bcb3dd20cc72487c527d135e076a0ff78b25 (diff)
downloadopie-41fe19a4e2e808d48429c84f4b7dd6b9af797ead.zip
opie-41fe19a4e2e808d48429c84f4b7dd6b9af797ead.tar.gz
opie-41fe19a4e2e808d48429c84f4b7dd6b9af797ead.tar.bz2
fix coredump on exit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 0526c2a..5503705 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -272,30 +272,30 @@ void MediaPlayer::blank( bool b ) {
void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
break;
case Key_F12: //home
qDebug("Blank here");
// mediaPlayerState->toggleBlank();
break;
case Key_F13: //mail
qDebug("Blank here");
// mediaPlayerState->toggleBlank();
break;
}
}
void MediaPlayer::cleanUp() {// this happens on closing
- Config cfg( "OpiePlayer" );
- playList->writeConfig( cfg );
+ Config cfg( "OpiePlayer" );
+ playList->writeConfig( cfg );
// QPEApplication::grabKeyboard();
// QPEApplication::ungrabKeyboard();
}
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index eaedaa5..d984022 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -1,49 +1,49 @@
#include <qpe/qpeapplication.h>
#include <qpe/qlibrary.h>
#include <qpe/config.h>
#include <qvaluelist.h>
#include <qobject.h>
#include <qdir.h>
#include "mediaplayerstate.h"
//#define MediaPlayerDebug(x) qDebug x
#define MediaPlayerDebug(x)
MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
: QObject( parent, name ) {
Config cfg( "OpiePlayer" );
readConfig( cfg );
isStreaming = false;
}
MediaPlayerState::~MediaPlayerState() {
- Config cfg( "OpiePlayer" );
- writeConfig( cfg );
+// Config cfg( "OpiePlayer" );
+// writeConfig( cfg );
}
void MediaPlayerState::readConfig( Config& cfg ) {
cfg.setGroup("Options");
isFullscreen = cfg.readBoolEntry( "FullScreen" );
isScaled = cfg.readBoolEntry( "Scaling" );
isLooping = cfg.readBoolEntry( "Looping" );
isShuffled = cfg.readBoolEntry( "Shuffle" );
usePlaylist = cfg.readBoolEntry( "UsePlayList" );
usePlaylist = TRUE;
isPlaying = FALSE;
isStreaming = FALSE;
isPaused = FALSE;
curPosition = 0;
curLength = 0;
curView = 'l';
}
void MediaPlayerState::writeConfig( Config& cfg ) const {
cfg.setGroup("Options");
cfg.writeEntry("FullScreen", isFullscreen );
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index bc9b166..75e2979 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -286,52 +286,52 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
connect( videoView, SIGNAL( returnPressed( QListViewItem *)),
this,SLOT( playIt( QListViewItem *)) );
connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) );
connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) );
connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*)));
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) );
connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
setCentralWidget( vbox5 );
readConfig( cfg );
QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
loadList(DocLnk( currentPlaylist));
setCaption(tr("OpiePlayer: ")+ currentPlaylist );
initializeStates();
}
PlayListWidget::~PlayListWidget() {
- if ( d->current ) {
- delete d->current;
- }
- delete d;
+ if ( d->current ) {
+ delete d->current;
+ }
+ delete d;
}
void PlayListWidget::initializeStates() {
d->tbPlay->setOn( mediaPlayerState->playing() );
d->tbLoop->setOn( mediaPlayerState->looping() );
d->tbShuffle->setOn( mediaPlayerState->shuffled() );
setPlaylist( true);
}
void PlayListWidget::readConfig( Config& cfg ) {
cfg.setGroup("PlayList");
QString currentString = cfg.readEntry("current", "" );
int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
for ( int i = 0; i < noOfFiles; i++ ) {
QString entryName;
entryName.sprintf( "File%i", i + 1 );
QString linkFile = cfg.readEntry( entryName );
if(QFileInfo( linkFile).exists() ) {
DocLnk lnk( linkFile );
if ( QFileInfo( lnk.file()).exists() || linkFile.find("http",0,TRUE) != -1) {
d->selectedFiles->addToSelection( lnk );