diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-08-21 15:18:07 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-08-21 15:18:07 +0200 |
commit | 4a1846acd122af58c601f9832ade4c4d8986e66a (patch) | |
tree | 019b131bf411ba3c7e62fcff0199bdf073825fa2 /src/quick/util/qquickpixmapcache.cpp | |
parent | 3c63ac03ed262b59962b45ac974b82edc7c83880 (diff) | |
parent | 27bee8076f50a948ffb9997e2a0673854681437d (diff) |
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
tools/qml/main.cpp
Change-Id: I6d521b21be85d91ebb96c28e2c64186f02d94842
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index a77bfd17d3..0b7b5ce9a8 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -137,6 +137,7 @@ public: class Event : public QEvent { public: Event(ReadError, const QString &, const QSize &, AutoTransform, QQuickTextureFactory *factory); + ~Event(); ReadError error; QString errorString; @@ -331,6 +332,11 @@ QQuickPixmapReply::Event::Event(ReadError e, const QString &s, const QSize &iSiz { } +QQuickPixmapReply::Event::~Event() +{ + delete textureFactory; +} + QNetworkAccessManager *QQuickPixmapReader::networkAccessManager() { if (!accessManager) { @@ -1021,6 +1027,7 @@ bool QQuickPixmapReply::event(QEvent *event) data->pixmapStatus = (de->error == NoError) ? QQuickPixmap::Ready : QQuickPixmap::Error; if (data->pixmapStatus == QQuickPixmap::Ready) { data->textureFactory = de->textureFactory; + de->textureFactory = 0; data->implicitSize = de->implicitSize; data->appliedTransform = de->autoTransform; PIXMAP_PROFILE(pixmapLoadingFinished(data->url, |