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.12 6.11 6.8
Change-Id: I044c363fb9ede9a0cdb0e0bb8f7d0b9f3ed33233
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>