qt5base-lts/tests/auto
Eirik Aavitsland 82aabafada Fix loading of image files with wrong, but known, file name extension
If QImageReader recognized the suffix of a file, it would by default
not check if the file contents matched the claimed format. Hence, a
valid but misnamed image file would fail to load.
Fix by adding contents check for suffix-recognized files.

[ChangeLog][QtGui][Image] Loading of image files having a file name
suffix for a different image file type has been fixed. QImageReader
will now ask the suffix format handler to confirm the file contents
(canRead()), and fall back to normal file content recognition on
failure. This implies a slight behavior change in
QImageReader::loopCount(), ::imageCount() and ::nextImageDelay(): For
an unreadable file with a recognized suffix, they would earlier return
0, while they now will return -1, i.e. error as per the documentation.

Fixes: QTBUG-42540
Fixes: QTBUG-68787
Change-Id: I205e83f29ed7190cbcae95dab960232544d012f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-07-18 16:05:57 +02:00
..
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake cmake: correct version dependency for qt5_add_big_resources 2019-05-20 12:49:37 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib QDir: strip Windows' long-path markers when converting from native 2019-07-17 20:07:15 +02:00
dbus unblacklist passing tests 2019-07-08 11:01:42 +00:00
gui Fix loading of image files with wrong, but known, file name extension 2019-07-18 16:05:57 +02:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_qnetworkreply: Use object.connect() to get rid of warning 2019-07-18 12:30:02 +02:00
opengl unblacklist passing tests 2019-07-08 11:01:42 +00:00
other Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
printsupport test: migrate QPrinterInfo test to QRegularExpression 2019-06-11 09:08:11 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
testlib QTestlib: Check compared images for device pixel ratio 2019-07-09 20:15:34 +02:00
tools Qt6: Fix uninitialized meta objects on Windows 2019-07-16 18:34:41 -07:00
widgets Merge remote-tracking branch 'origin/5.13' into dev 2019-07-17 10:44:21 +02:00
xml Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00