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
parent
b2b941823e
commit
d59ae19c49
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue