diff options
-rw-r--r-- | src/declarative/fx/qfxblendedimage.cpp | 11 | ||||
-rw-r--r-- | src/declarative/fx/qfxblendedimage.h | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxhighlightfilter.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfximage.cpp | 17 | ||||
-rw-r--r-- | src/declarative/fx/qfxparticles.cpp | 3 |
5 files changed, 28 insertions, 6 deletions
diff --git a/src/declarative/fx/qfxblendedimage.cpp b/src/declarative/fx/qfxblendedimage.cpp index e216196..0c93fef 100644 --- a/src/declarative/fx/qfxblendedimage.cpp +++ b/src/declarative/fx/qfxblendedimage.cpp @@ -81,6 +81,17 @@ QFxBlendedImage::QFxBlendedImage(QFxItem *parent) } /*! + Cancels any pending image loads and destroys the image. +*/ +QFxBlendedImage::~QFxBlendedImage() +{ + if (!primUrl.isEmpty()) + QFxPixmap::cancelGet(primUrl,this); + if (!secUrl.isEmpty()) + QFxPixmap::cancelGet(secUrl,this); +} + +/*! \qmlproperty string BlendedImage::primaryUrl The URL of the first image to be displayed in this item. */ diff --git a/src/declarative/fx/qfxblendedimage.h b/src/declarative/fx/qfxblendedimage.h index 7169b92..248cc9d 100644 --- a/src/declarative/fx/qfxblendedimage.h +++ b/src/declarative/fx/qfxblendedimage.h @@ -63,6 +63,7 @@ class Q_DECLARATIVE_EXPORT QFxBlendedImage : public QFxItem Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform) public: QFxBlendedImage(QFxItem *parent=0); + ~QFxBlendedImage(); QUrl primaryUrl() const; void setPrimaryUrl(const QUrl &); diff --git a/src/declarative/fx/qfxhighlightfilter.cpp b/src/declarative/fx/qfxhighlightfilter.cpp index 2c6fb0a..1671fc6 100644 --- a/src/declarative/fx/qfxhighlightfilter.cpp +++ b/src/declarative/fx/qfxhighlightfilter.cpp @@ -114,6 +114,8 @@ QFxHighlightFilter::QFxHighlightFilter(QObject *parent) QFxHighlightFilter::~QFxHighlightFilter() { + if (!d->url.isEmpty()) + QFxPixmap::cancelGet(d->url, this); delete d; d = 0; } diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 05738e3..40389c4 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -127,6 +127,10 @@ QFxImage::~QFxImage() Q_D(QFxImage); if (d->sciReply) d->sciReply->deleteLater(); + if (!d->url.isEmpty()) + QFxPixmap::cancelGet(d->url, this); + if (!d->sciurl.isEmpty()) + QFxPixmap::cancelGet(d->sciurl, this); #if defined(QFX_RENDER_OPENGL) if (d->tex) { d->tex->release(); @@ -972,6 +976,13 @@ void QFxImage::setGridScaledImage(const QFxGridScaledImage& sci) d->status = Error; emit statusChanged(d->status); } else { + QFxScaleGrid *sg = scaleGrid(); + sg->setTop(sci.gridTop()); + sg->setBottom(sci.gridBottom()); + sg->setLeft(sci.gridLeft()); + sg->setRight(sci.gridRight()); + setOptions(QFxImage::SimpleItem, false); + d->sciurl = d->url.resolved(QUrl(sci.pixmapUrl())); d->reply = QFxPixmap::get(qmlEngine(this), d->sciurl, this, SLOT(requestFinished())); if (d->reply) { @@ -981,12 +992,6 @@ void QFxImage::setGridScaledImage(const QFxGridScaledImage& sci) d->progress = 1.0; emit progressChanged(d->progress); } - QFxScaleGrid *sg = scaleGrid(); - sg->setTop(sci.gridTop()); - sg->setBottom(sci.gridBottom()); - sg->setLeft(sci.gridLeft()); - sg->setRight(sci.gridRight()); - setOptions(QFxImage::SimpleItem, false); } } diff --git a/src/declarative/fx/qfxparticles.cpp b/src/declarative/fx/qfxparticles.cpp index 25e359d..4cd34c4 100644 --- a/src/declarative/fx/qfxparticles.cpp +++ b/src/declarative/fx/qfxparticles.cpp @@ -630,6 +630,9 @@ QFxParticles::QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent) QFxParticles::~QFxParticles() { + Q_D(QFxParticles); + if (!d->url.isEmpty()) + QFxPixmap::cancelGet(d->url, this); } /*! |