|author||Konstantin Ritt <email@example.com>||2012-10-08 16:40:13 +0300|
|committer||The Qt Project <firstname.lastname@example.org>||2012-10-10 13:24:23 +0200|
Invalidate old QImage data if load()/loadFromData() has failed
This guarantees one will never get `!img.isNull()` after load()/loadFromData() has failed, even if the image was not null before. Apply the same fix to QPixmap and QPicture. Change-Id: Ida1ad6a6f0fc830df8e75ada0c163fc2d3360dea Reviewed-by: Samuel Rødal <email@example.com>
Diffstat (limited to 'dist')
1 files changed, 5 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index a56325d40a..f2164087eb 100644
@@ -494,6 +494,11 @@ QtGui
For consistency with RGB32 and other 32-bit formats, function now expects
image data in RGB layout as opposed to BGR layout.
+* Behavioral change in QImage and QPixmap load()/loadFromData() on a non-null image:
+ If load() or loadFromData() fails to load the image (returns false) then
+ the existent image data will be invalidated, so that isNull() is guaranteed
+ to return true in this case.
* QInputContext removed as well as related getters and setters on QWidget and QApplication.