[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.11'. Changed from 54fe5abaa7358dcfbf40121051c055b1f073179b to 7f03e4a46757226b0fc71fdd40cadff64de8ef9e 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 8c6f939a94b49f31d1090ea7220c1128e240e372 by Marc Mutz on 24/07/2026 at 07:14.. 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). Manual conflict resolution for 6.11: - rebased to before conflicting change 5b1d401a523a229e0523e06a591ab3d447e84916 Pick-to: 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]> (cherry picked from commit cf82891ecd3726717eebbf7e1f49344936531008) Reviewed-by: Marc Mutz <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/8c6f939a94b49f31d1090ea7220c1128e240e372 Git commit f894bebc9b5127c0f5da3e677f9901a91bccbf15 by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 24/07/2026 at 07:30.. QTiffHandler: Extract Method Private::readNextImage() from read() This allows to centralize the Private::close() call in read(), instead of having every early return execute it manually, which one return already forgot (fixed in a prequel commit). I also considered simply adding a qScopeGuard([&] { d->close(); }), but a traditional Extract Method seemed more productive, as it reduces the size of the already-large function and separates concerns, instead of adding another few lines, and leaving concerns entangled. Amends the addition of the TIFF plugin to qtimageformats, from qtbase (5.0), but made more urgent by adding support for more and more formats over time. Pick-to: 6.8 Change-Id: I641103b2a2e2f22340066802d64d286d8242fde2 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit bdda42e9ec461b17d873b2e11719dcd33577d032) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 4eed0fd5ab1f56b0f9730a4bd7a2f390d2f90ff0) https://invent.kde.org/qt/qt/qtimageformats/-/commit/f894bebc9b5127c0f5da3e677f9901a91bccbf15 Git commit 8b5accd1898dd991580800c303209c8761feab50 by Qt Cherry-pick Bot (on behalf of Marc Mutz) on 24/07/2026 at 07:30.. QTiffHandler: make two of the Private methods static These two don't access *this, so save the this pointer when calling them. Since their callers are (again) on the same class as the methods, no name qualification is needed. Pick-to: 6.8 Change-Id: Ic6a52a6ea988febdc7b49900ad3b83fa7b02f172 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 05a025e59d589cc0155714452b575998124cc4f2) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit bb8a016b9ba6602f208acea9c45cf931e66732c7) https://invent.kde.org/qt/qt/qtimageformats/-/commit/8b5accd1898dd991580800c303209c8761feab50 Git commit 7f03e4a46757226b0fc71fdd40cadff64de8ef9e by Marc Mutz on 24/07/2026 at 07:59.. 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.8 Change-Id: I6ea3566ec7a9d4f3edf12efb7d43c23d5dde1808 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 673593f687c8a56e9b57aec024cf6a06bd3cf37b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 36b3b11921ab5de479ee569e09c828add780f1aa) Reviewed-by: Marc Mutz <[email protected]> https://invent.kde.org/qt/qt/qtimageformats/-/commit/7f03e4a46757226b0fc71fdd40cadff64de8ef9e