macOS: Provide more details when failing to parse ICC profile data

Pick-to: 6.4
Task-number: QTBUG-108175
Change-Id: Ic9191a659ef1699701a26d90384285364eaef41b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Tor Arne Vestbø 2022-11-03 12:22:24 +01:00
parent b2b941823e
commit d59ae19c49
1 changed files with 3 additions and 1 deletions

View File

@ -259,7 +259,9 @@ void QCocoaScreen::update(CGDirectDisplayID displayId)
m_depth = NSBitsPerPixelFromDepth(nsScreen.depth);
m_colorSpace = QColorSpace::fromIccProfile(QByteArray::fromNSData(nsScreen.colorSpace.ICCProfileData));
if (!m_colorSpace.isValid()) {
qWarning() << "macOS generated a color-profile Qt couldn't parse. This shouldn't happen.";
qCWarning(lcQpaScreen) << "Failed to parse ICC profile for" << nsScreen.colorSpace
<< "with ICC data" << nsScreen.colorSpace.ICCProfileData
<< "- Falling back to sRGB";
m_colorSpace = QColorSpace::SRgb;
}