From 7c21bfd199fcae8c81982526bf551ee1d7fa1b26 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 7 Oct 2018 18:49:10 +1000 Subject: [PATCH] Silence "libpng warning: iCCP: known incorrect sRGB profile" warnings These are thrown by 3rd party components (e.g. webkit) which we have no control over, and have low value anyway Better to keep the debug log cleaner so that real errors are noticed --- src/app/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index b32d14b6d7b0..0eb656b49cb4 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -370,6 +370,12 @@ void myMessageOutput( QtMsgType type, const char *msg ) myPrint( "Critical: %s\n", msg ); break; case QtWarningMsg: + { + // Ignore libpng iCPP known incorrect SRGB profile errors + // (which are thrown by 3rd party components we have no control over and have low value anyway). + if ( strncmp( msg, "libpng warning: iCCP: known incorrect sRGB profile", 50 ) == 0 ) + break; + myPrint( "Warning: %s\n", msg ); #ifdef QGISDEBUG @@ -391,6 +397,8 @@ void myMessageOutput( QtMsgType type, const char *msg ) } break; + } + case QtFatalMsg: { myPrint( "Fatal: %s\n", msg );