Skip to content

Commit 7c21bfd

Browse files
committed
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
1 parent 80e19b6 commit 7c21bfd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ void myMessageOutput( QtMsgType type, const char *msg )
370370
myPrint( "Critical: %s\n", msg );
371371
break;
372372
case QtWarningMsg:
373+
{
374+
// Ignore libpng iCPP known incorrect SRGB profile errors
375+
// (which are thrown by 3rd party components we have no control over and have low value anyway).
376+
if ( strncmp( msg, "libpng warning: iCCP: known incorrect sRGB profile", 50 ) == 0 )
377+
break;
378+
373379
myPrint( "Warning: %s\n", msg );
374380

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

393399
break;
400+
}
401+
394402
case QtFatalMsg:
395403
{
396404
myPrint( "Fatal: %s\n", msg );

0 commit comments

Comments
 (0)