Suppress libpng warning about color profiles

This commit is contained in:
Florian Bruhin 2014-06-02 23:10:21 +02:00
parent 8aff446a30
commit 6fedc53a4d

View File

@ -130,6 +130,11 @@ def qt_message_handler(msg_type, context, msg):
QtCriticalMsg: logging.ERROR,
QtFatalMsg: logging.CRITICAL,
}
# Suppress some messages because they're well-known.
SUPPRESSED_MSGS = ['libpng warning: iCCP: Not recognizing known sRGB '
'profile that has been edited']
if msg in SUPPRESSED_MSGS:
return
# We get something like "void qt_png_warning(png_structp, png_const_charp)"
# from Qt, but only want "qt_png_warning".
func = re.match(r'\w* (\w*)\(.*\)', context.function).group(1)