macOS: Provide more details when failing to parse ICC profile data
Task-number: QTBUG-108175 Change-Id: Ic9191a659ef1699701a26d90384285364eaef41b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit d59ae19c49853fa97ff5b410717e69e35e27d867) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
31e4d6403c
commit
d056a3234c
@ -258,7 +258,9 @@ void QCocoaScreen::update(CGDirectDisplayID displayId)
|
|||||||
m_depth = NSBitsPerPixelFromDepth(nsScreen.depth);
|
m_depth = NSBitsPerPixelFromDepth(nsScreen.depth);
|
||||||
m_colorSpace = QColorSpace::fromIccProfile(QByteArray::fromNSData(nsScreen.colorSpace.ICCProfileData));
|
m_colorSpace = QColorSpace::fromIccProfile(QByteArray::fromNSData(nsScreen.colorSpace.ICCProfileData));
|
||||||
if (!m_colorSpace.isValid()) {
|
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;
|
m_colorSpace = QColorSpace::SRgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user