From e23328fda8ddb2989d49f91c4c7acdb04a17f736 Mon Sep 17 00:00:00 2001 From: Sertonix Norson Date: Thu, 1 Oct 2026 14:37:36 +0200 Subject: [PATCH] FF: replace broken #if Q_LITTLE_ENDIAN Q_LITTLE_ENDIAN was used incorrectly, it should have been "#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN" Use qFromBigEndian since it is more explicit. Fixes 6d5e61f0b0eb --- src/imageformats/ff.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/imageformats/ff.cpp b/src/imageformats/ff.cpp index 3aa4937..7ae0be3 100644 --- a/src/imageformats/ff.cpp +++ b/src/imageformats/ff.cpp @@ -176,11 +176,7 @@ bool FFHandler::read(QImage *image) qCWarning(LOG_FFPLUGIN) << "FFHandler::read() error while reading image scanline"; return false; } -#if Q_LITTLE_ENDIAN - for (auto i = 0; i < size; i += 2) { - std::swap(line[i], line[i + 1]); - } -#endif + qFromBigEndian(line, size / 2, line); } img.setColorSpace(QColorSpace(QColorSpace::SRgb));