QQuickAnimatedImage::load() is an overloaded method that is called implicitly from QQuickImage/QQuickImageBase whenever an user changes basic properties such as fillMode, mipmap, sourceSize, etc. In the case of a web source, this can cause a real problem with loading failure. For example, when the user changes `fillMode` immediately after setting the `source` property, like: anim.source = <some web image> anim.fillMode = Image.PreserveAspectFit Currently the code above lead to the error "QML AnimatedImage: Error Reading Animated Image File". This happens because QQAI::load() initiates a new network request at the same time that one is already in progress. And when the first reply finishes, we try to read data from the new reply that is not ready yet. To fix this, we can simply ignore and do nothing on QQAI::load() if there is already active network request (i.e. d->reply is not nullptr). This has no effect on the actual source change, since we explicitly remove and nullify the active reply in QQAI::setSource(). By this change we also fix potential memory leak, because the old reply was previously not destroyed properly in QQuickAnimatedImage::load(). Fixes: QTBUG-120555 Pick-to: 6.5 Change-Id: I28f964b51c059855c04a4c80bdce127b3e9974a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit |
||
---|---|---|
LICENSES | ||
cmake | ||
coin | ||
dist | ||
examples | ||
features | ||
src | ||
tests | ||
tools | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.tag | ||
CMakeLists.txt | ||
README.md | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
qtdeclarative.doxy | ||
sync.profile |
README.md
qtdeclarative
The qtdeclarative repository is home to QML, Qt Quick and several related modules:
- Qt QML
- Qt QML Core
- Qt QML Models
- Qt QML WorkerScript
- Qt QML XmlListModel
- Qt Quick
- Qt Quick Controls 2
- Qt Quick Layouts
- Qt Quick Local Storage
- Qt Quick Particles
- Qt Quick Shapes
- Qt Quick Templates
- Qt Quick Test
In addition, there are several Qt Labs modules: