Fix compilation failure with Qt 6.7

This commit is contained in:
Jiaqi Wu
2025-09-20 13:37:52 +08:00
parent fda751c641
commit 05c3a1afe6
4 changed files with 7 additions and 7 deletions

View File

@ -779,10 +779,10 @@ static bool writeImage24(const QImage &image, QDataStream &s, PCXHEADER &header)
return false;
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
auto cs = image.colorSpace();
auto tcs = QColorSpace();
auto tfmt = image.format();
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
auto cs = image.colorSpace();
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
tcs = QColorSpace(QColorSpace::SRgb);
tfmt = QImage::Format_RGB32;