From bb3f1cc62ac73ab2ac41f2b78c3776cebe2993f3 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 25 Jul 2024 18:47:52 +0200 Subject: [PATCH] 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 (cherry picked from commit 959eaa88f213c31040d58cda1b5edb1b773855e4) Reviewed-by: Qt Cherry-pick Bot --- src/gui/image/qimage_p.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index 43b03ada7c2..daa35a6718d 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -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 }; }