[qt/qt/qtimageformats]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/qt/qtimageformats Pushed by mirror-service into branch '6.12'. Changed from a3e10797b0c881fd8a998adffe4b2eab30b9e1c5 to 5e50cca2b9473d547b74e2ee0a16ade62d8a7487 Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit cf82891ecd3726717eebbf7e1f49344936531008 by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 23/07/2026 at 21:38.. QTiffHandler: simplify use of TIFFSetField() in write() Unlike the recent addition of the writeScanline lambda, this is just to DRY the field setting a bit. A few prequel commits have shown that it was needed, too. So add a setField lambda that captures 'tiff' so it doesn't need to be repeated on every call, like writeScanline. Unlike writeScanline, setField() is a variadic template / polymorphic lambda, since TIFFSetField is a (C-)variadic function. As a drive-by, remove some variables that not pulling their own weight, because they're just set once and read once, and in the same block of consecutive code lines. Also change brace placement for multi-line if conditions to make it clearer where the body begins, and adjust some inconsistent extra indentation. Amends many, incl. the addition of the TIFF plugin to qtimageformats from qtbase (5.0). Pick to all active branches to clear the way for a more important refactoring (TIFF* → unique_ptr). Pick-to: 6.11 6.8 Change-Id: I044c363fb9ede9a0cdb0e0bb8f7d0b9f3ed33233 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit c78e426beb44b95c8e40b6bc2727a3a68ee3ee61) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/cf82891ecd3726717eebbf7e1f49344936531008 Git commit fc36c8b7ae9c95ac86d6fdc084467b48889f8b15 by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 23/07/2026 at 21:38.. QTiffHandler: fix Coverity warning about unchecked return values When TIFFIsTiled() returns true, then TIFFGetField(TILEWIDTH/LENGTH) oughtn't fail, but don't depend on internals of libtiff (the docs don't guarantee this), so check their return values, too. Found by Coverity complaining that two out of 16 TIFFGetField() calls didn't have their return values checked. Amends 30301436b59efe7ff25991cbbaa388f6f1b4d66e (5.9). Pick-to: 6.11 6.8 Coverity-Id: 178800 Change-Id: I8aa8e2080b47ea0597170a46ddc86699f438d001 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 0f53243accb9bc74cf66d9cc61d337d66a939de3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/fc36c8b7ae9c95ac86d6fdc084467b48889f8b15 Git commit 36b3b11921ab5de479ee569e09c828add780f1aa by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 23/07/2026 at 22:10.. QTiffHandler: replace manual memory mgmt with unique_ptr [1/N]: write() and openInternal() The write() function, in particular, was such a C-style tangle of TIFFClose() calls in front of every early return (of which there are many!) that I couldn't help myself porting to unique_ptr. Yes, the impedance mismatch between a unique_ptr and C APIs is rather large, but the memory safety gained trumps that. Besides, two prequel refactorings have dealt with the bulk of the changes by centralizing the access to the pointer in two lambda local to write(). Keep Private::tiff as a raw pointer for now to keep the commit small for ease of review. Consequently, we need to release() into it in openForRead(). Amends the move of the TIFF plugin from qtbase to to qtimageformats, from qtbase (5.0). Granted, that didn't have C++11 unique_ptr, yet, but it did have Qt QScopedPointer and C++98 std::auto_ptr. Picking to all active branches to keep the way free for any security updates that follow. Pick-to: 6.11 6.8 Change-Id: I6ea3566ec7a9d4f3edf12efb7d43c23d5dde1808 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 673593f687c8a56e9b57aec024cf6a06bd3cf37b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/36b3b11921ab5de479ee569e09c828add780f1aa Git commit 5e50cca2b9473d547b74e2ee0a16ade62d8a7487 by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 23/07/2026 at 22:10.. QTiffHandler: move some private methods to the Private class This is in preparation of an important read() robustness refactoring (dragging the error-prone manual d->close() out of the functional parts of read()). As a drive-by, drop the floatingPoint argument of rgb48fixup(), which would otherwise now shadow Private::floatingPoint(), and which the method can just as well read from *this. Pick-to: 6.11 6.8 Change-Id: I3d64ce4cf7e34c5b51674ca16c601e9a4c393d2b Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit e4a5ff139d440034b44c075a58ad69ac34bf4206) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/5e50cca2b9473d547b74e2ee0a16ade62d8a7487