QTiffHandler: simplify use of TIFFWriteScanline() in write()
Fix the impedance mismatch between TIFFWriteScanline() wanting a void*
while QImage::scanLine() only provides pointer-to-const. Only one
caller correctly used a const_cast<uchar*>(), some were using C-style
casts to cast away const.
To fix, add a lambda, writeScanline, which takes the line by const
void*, and const-casts internally.
As a drive-by, remove the unneeded reinterpret_cast<uint32_t*>() (both
the new lambda and the old TIFFWriteScanline() take void*, so don't
need that cast).
Amends many. Because it is kinda invasive, pick to all active
branches, to not block real security fixes later on.
Pick-to: 6.12 6.11 6.8
Change-Id: I907a3f4197314857143f14519ab4620f660271b9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>