QImage: remove outdated version check

Remove an outdated ifdef which was already always true.

Pick-to: 6.8 6.7 6.5
Change-Id: I99b645ac3465e81641813726ef1004770561d554
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Christian Ehrlicher 2024-07-25 18:47:52 +02:00
parent f4d2f3d1d1
commit 959eaa88f2

View File

@ -110,11 +110,9 @@ QImageData::calculateImageParameters(qsizetype width, qsizetype height, qsizetyp
qsizetype dummy;
if (qMulOverflow(height, qsizetype(sizeof(uchar *)), &dummy))
return invalid; // why is this here?
#if 1 || QT_VERSION < QT_VERSION_CHECK(6,0,0) // ### can only fix this if QImage dimensions are not int anymore
// Disallow images where width * depth calculations might overflow
if (width > (INT_MAX - 31) / depth)
return invalid;
#endif
return { bytes_per_line, total_size };
}