diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-06-24 00:31:41 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-06-24 00:31:41 (GMT) |
commit | bb3ae9779730b6d4a0442ea5553b0dfab1a3da2b (patch) | |
tree | 03be54c51d230d11648e90c0d00bdb039a0fcff4 /src/declarative/util | |
parent | c8d84429d92b159c187287fbc6dad33c9cf51a11 (diff) | |
download | Qt-bb3ae9779730b6d4a0442ea5553b0dfab1a3da2b.zip Qt-bb3ae9779730b6d4a0442ea5553b0dfab1a3da2b.tar.gz Qt-bb3ae9779730b6d4a0442ea5553b0dfab1a3da2b.tar.bz2 |
Ensure sourcesize is in pixmap cache key.
Task-number: QTBUG-11645
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativepixmapcache.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index a4ddf46..0a14462 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -510,6 +510,12 @@ bool QDeclarativePixmapReply::event(QEvent *event) else d->errorString = de->errorString; QByteArray key = d->url.toEncoded(QUrl::FormattingOption(0x100)); + if (d->forced_width > 0 || d->forced_height > 0) { + key += ':'; + key += QByteArray::number(d->forced_width); + key += 'x'; + key += QByteArray::number(d->forced_height); + } QString strKey = QString::fromLatin1(key.constData(), key.count()); QPixmapCache::insert(strKey, d->pixmap); // note: may fail (returns false) emit finished(); |