summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-04-08 05:07:54 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-04-08 05:07:54 (GMT)
commit9fd2d52881356fb214213f139a2f25081fc848e4 (patch)
tree41902768ff80a3ba81df3fe75cf25a12bd241822 /src/declarative
parent31ec693cd6ae4cf5a2533092f45ba9bb154ba152 (diff)
downloadQt-9fd2d52881356fb214213f139a2f25081fc848e4.zip
Qt-9fd2d52881356fb214213f139a2f25081fc848e4.tar.gz
Qt-9fd2d52881356fb214213f139a2f25081fc848e4.tar.bz2
Fix AnimatedImage for remote image test. Fix and test sourceSize property.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index f14f773..cc062f0 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -312,7 +312,7 @@ void QDeclarativeAnimatedImage::playingStatusChanged()
void QDeclarativeAnimatedImage::componentComplete()
{
Q_D(QDeclarativeAnimatedImage);
- QDeclarativeImage::componentComplete();
+ QDeclarativeItem::componentComplete(); // NOT QDeclarativeImage
if (!d->reply) {
setCurrentFrame(d->preset_currentframe);
d->preset_currentframe = 0;
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
index 6ab66b3..9d8087c 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
@@ -61,6 +61,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeAnimatedImage : public QDeclarativeImage
Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
Q_PROPERTY(int frameCount READ frameCount)
+
+ // read-only for AnimatedImage
+ Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
+
public:
QDeclarativeAnimatedImage(QDeclarativeItem *parent=0);
~QDeclarativeAnimatedImage();
@@ -83,6 +87,7 @@ Q_SIGNALS:
void playingChanged();
void pausedChanged();
void frameChanged();
+ void sourceSizeChanged();
private Q_SLOTS:
void movieUpdate();
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
index 6c84456..49b1c58 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
@@ -73,7 +73,7 @@ public:
bool asynchronous() const;
void setAsynchronous(bool);
- void setSourceSize(const QSize&);
+ virtual void setSourceSize(const QSize&);
QSize sourceSize() const;
Q_SIGNALS: