QImage: remove outdated version check

Remove an outdated ifdef which was already always true.

Pick-to: 6.7 6.5
Change-Id: I99b645ac3465e81641813726ef1004770561d554
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 959eaa88f213c31040d58cda1b5edb1b773855e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-07-25 18:47:52 +02:00 committed by Qt Cherry-pick Bot
parent 2beaf27122
commit bb3f1cc62a

View File

@ -107,11 +107,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 };
}