summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-18 11:42:01 (UTC)
committer llornkcor <llornkcor>2004-09-18 11:42:01 (UTC)
commitd4e33108b974aa802f10d30a6a082adf67681224 (patch) (side-by-side diff)
tree2c172af340d9bd4f7b85d4e42c33f8d190ef63f2
parent35d96e2215c765da2270589c059c717a858333ca (diff)
downloadopie-d4e33108b974aa802f10d30a6a082adf67681224.zip
opie-d4e33108b974aa802f10d30a6a082adf67681224.tar.gz
opie-d4e33108b974aa802f10d30a6a082adf67681224.tar.bz2
fix crash #1408
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index e851044..2396ed5 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -89,3 +89,2 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
- // odebug << "skin path " + skinPath << oendl;
@@ -118,3 +117,2 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
}
- // odebug << "finished loading first pics" << oendl;
for ( int i = 0; i < 7; i++ ) {
@@ -124,3 +122,2 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
-
QWidget *d = QApplication::desktop();
@@ -130,3 +127,2 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
if( (width != pixBg->width() ) || (height != pixBg->height() ) ) {
-// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl;
QImage img;
@@ -135,6 +131,5 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
}
- setBackgroundPixmap( *pixBg );
+ setBackgroundPixmap( *pixBg );
currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 );
-
slider = new QSlider( Qt::Horizontal, this );
@@ -142,3 +137,4 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
slider->setMaxValue( 1 );
- slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
+
+ slider->setBackgroundPixmap( *pixBg );
slider->setFocusPolicy( QWidget::NoFocus );
@@ -160,4 +156,5 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
setFullscreen( mediaPlayerState->fullscreen() );
-// setPaused( mediaPlayerState->paused() );
- setPlaying( mediaPlayerState->playing() );
+// setPlaying( mediaPlayerState->playing() );
+// if(this->x() < 0 || this->y() < 0)
+// this->move(0,0);
}
@@ -474,2 +471,6 @@ bool VideoWidget::playVideo() {
+ QWidget *d = QApplication::desktop();
+ int d_width = d->width();
+ int d_height = d->height();
+
ColorFormat format = (dd == 16) ? RGB565 : BGRA8888;
@@ -485,4 +486,4 @@ bool VideoWidget::playVideo() {
- w = 320;
- h = 240;
+ w = d_width; //320;
+ h = d_height; //240;
@@ -527,5 +528,4 @@ bool VideoWidget::playVideo() {
QPainter p(this);
-
- w = 320;
- h = 240;
+ w = d_width; //320;
+ h = d_height; //240;