diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-08-14 06:04:35 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-08-14 06:08:31 (GMT) |
commit | fe59969d239231ae1bfb33e702f58d124554db95 (patch) | |
tree | 8250be36f68fe0fcf8c0394c6e38cc324ea000dc /src/declarative/extra | |
parent | 8ed52465b705ca4ce35d9a8d1ab61e284b0f6dc3 (diff) | |
download | Qt-fe59969d239231ae1bfb33e702f58d124554db95.zip Qt-fe59969d239231ae1bfb33e702f58d124554db95.tar.gz Qt-fe59969d239231ae1bfb33e702f58d124554db95.tar.bz2 |
Tidy up usage of QNetworkReply returned by QFxPixmapCache::get, update
documentation.
Diffstat (limited to 'src/declarative/extra')
-rw-r--r-- | src/declarative/extra/qfxanimatedimageitem_p.h | 4 | ||||
-rw-r--r-- | src/declarative/extra/qfxparticles.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/extra/qfxanimatedimageitem_p.h b/src/declarative/extra/qfxanimatedimageitem_p.h index 859f869..56252ca 100644 --- a/src/declarative/extra/qfxanimatedimageitem_p.h +++ b/src/declarative/extra/qfxanimatedimageitem_p.h @@ -58,6 +58,7 @@ QT_BEGIN_NAMESPACE class QMovie; +class QNetworkReply; class QFxAnimatedImageItemPrivate : public QFxImagePrivate { @@ -65,13 +66,14 @@ class QFxAnimatedImageItemPrivate : public QFxImagePrivate public: QFxAnimatedImageItemPrivate() - : playing(true), paused(false), _movie(0) + : playing(true), paused(false), _movie(0), reply(0) { } bool playing; bool paused; QMovie *_movie; + QNetworkReply *reply; }; QT_END_NAMESPACE diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp index 0e94ea6..2380655 100644 --- a/src/declarative/extra/qfxparticles.cpp +++ b/src/declarative/extra/qfxparticles.cpp @@ -405,7 +405,6 @@ public: bool emitting; QFxParticleMotion *motion; QFxParticlesPainter *paintItem; - QPointer<QNetworkReply> reply; QList<QFxParticle> particles; QTickAnimationProxy<QFxParticlesPrivate, &QFxParticlesPrivate::tick> clock; @@ -660,9 +659,9 @@ void QFxParticles::setSource(const QUrl &name) } else { d->url = name; Q_ASSERT(!name.isRelative()); - d->reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->image); - if (d->reply) - connect(d->reply, SIGNAL(finished()), this, SLOT(imageLoaded())); + QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->image); + if (reply) + connect(reply, SIGNAL(finished()), this, SLOT(imageLoaded())); else { //### unify with imageLoaded d->paintItem->updateSize(); |