summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-11-19 05:04:28 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-11-19 05:04:28 (GMT)
commit6e31d4b9b98169331196d123ae77e2a938070b3d (patch)
tree3723d6e68edad7a20f12881e6b3739708d5fae7f /src/declarative
parent49660c68e13538dc4427940da384121bbaa79793 (diff)
downloadQt-6e31d4b9b98169331196d123ae77e2a938070b3d.zip
Qt-6e31d4b9b98169331196d123ae77e2a938070b3d.tar.gz
Qt-6e31d4b9b98169331196d123ae77e2a938070b3d.tar.bz2
Set initial frame for remote image sources once they are loaded. Also
add more tests.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index 97fdc6a..f389295 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -209,7 +209,7 @@ void QmlGraphicsAnimatedImage::setSource(const QUrl &url)
//### should be unified with movieRequestFinished
d->_movie = new QMovie(lf);
if (!d->_movie->isValid()){
- qWarning() << "Error Reading Animated Image File " << d->url;
+ qWarning() << "Error Reading Animated Image File" << d->url;
delete d->_movie;
d->_movie = 0;
return;
@@ -261,7 +261,7 @@ void QmlGraphicsAnimatedImage::movieRequestFinished()
d->_movie->setCacheMode(QMovie::CacheAll);
if(d->playing)
d->_movie->start();
- else {
+ if (d->paused || !d->playing) {
d->_movie->jumpToFrame(d->preset_currentframe);
d->preset_currentframe = 0;
}
@@ -293,8 +293,10 @@ void QmlGraphicsAnimatedImage::playingStatusChanged()
void QmlGraphicsAnimatedImage::componentComplete()
{
Q_D(QmlGraphicsAnimatedImage);
- setCurrentFrame(d->preset_currentframe);
- d->preset_currentframe = 0;
+ if (!d->reply) {
+ setCurrentFrame(d->preset_currentframe);
+ d->preset_currentframe = 0;
+ }
}
QT_END_NAMESPACE