diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2017-02-03 10:10:52 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2017-02-03 12:19:41 +0000 |
commit | ecd4c83ef764f086f2e101b4201484f3d828c0e3 (patch) | |
tree | 8278868ab2e8aa4c8cf60c72d5baaefae7831da6 /src/quick/items/qquickanimatedimage.cpp | |
parent | b0ced704bcaeb6dc71622c9ce87b78f3b5bd827c (diff) |
Allow to pass all the relevant info to QQuickPixmap::isCached
If we don't allow to pass the QQuickImageProviderOptions to the isCached
we are missing one of the three components that identify if the pixmap is actually cached.
Old code is ok for the QQuickAnimatedImagePrivate use case since it always creates
QQuickPixmap with the default QQuickImageProviderOptions options, but if someone else
wants to use QQuickPixmap::isCached they will need to be able to pass
the options part of the cache key.
Change-Id: I3153ad9ed30e7332b5cb4896dcebd408f2bd9afe
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/quick/items/qquickanimatedimage.cpp')
-rw-r--r-- | src/quick/items/qquickanimatedimage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp index a1833081c8..22ea4774be 100644 --- a/src/quick/items/qquickanimatedimage.cpp +++ b/src/quick/items/qquickanimatedimage.cpp @@ -67,7 +67,7 @@ QQuickPixmap* QQuickAnimatedImagePrivate::infoForCurrentFrame(QQmlEngine *engine .arg(current)); } if (!requestedUrl.isEmpty()) { - if (QQuickPixmap::isCached(requestedUrl, QSize())) + if (QQuickPixmap::isCached(requestedUrl, QSize(), QQuickImageProviderOptions())) pixmap = new QQuickPixmap(engine, requestedUrl); else pixmap = new QQuickPixmap(requestedUrl, _movie->currentImage()); |