Skip to content

Commit

Permalink
Silence "libpng warning: iCCP: known incorrect sRGB profile" warnings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nyalldawson committed Oct 7, 2018
1 parent 80e19b6 commit 7c21bfd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/main.cpp
Expand Up @@ -370,6 +370,12 @@ void myMessageOutput( QtMsgType type, const char *msg )
myPrint( "Critical: %s\n", msg ); myPrint( "Critical: %s\n", msg );
break; break;
case QtWarningMsg: 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 ); myPrint( "Warning: %s\n", msg );


#ifdef QGISDEBUG #ifdef QGISDEBUG
Expand All @@ -391,6 +397,8 @@ void myMessageOutput( QtMsgType type, const char *msg )
} }


break; break;
}

case QtFatalMsg: case QtFatalMsg:
{ {
myPrint( "Fatal: %s\n", msg ); myPrint( "Fatal: %s\n", msg );
Expand Down

0 comments on commit 7c21bfd

Please sign in to comment.