Skip to content

Commit e9f024b

Browse files
committedMay 3, 2020
Less debug noise
1 parent a934f0f commit e9f024b

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed
 

‎src/core/qgsdatasourceuri.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ QgsDataSourceUri::QgsDataSourceUri( const QString &u )
5858

5959
if ( i == uri.length() || uri[i] != '=' )
6060
{
61-
QgsDebugMsg( QStringLiteral( "= expected after parameter name, skipping text '%1'" ).arg( pname ) );
61+
// no "=", so likely not a parameter name
6262
continue;
6363
}
6464

‎src/core/qgsmultirenderchecker.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ bool QgsMultiRenderChecker::runTest( const QString &testName, unsigned int misma
4747

4848
QVector<QgsDartMeasurement> dartMeasurements;
4949

50-
const auto constSubDirs = subDirs;
51-
for ( const QString &suffix : constSubDirs )
50+
for ( const QString &suffix : qgis::as_const( subDirs ) )
5251
{
53-
qDebug() << "Checking subdir " << suffix;
52+
if ( subDirs.count() > 1 )
53+
{
54+
qDebug() << "Checking subdir " << suffix;
55+
}
5456
bool result;
5557
QgsRenderChecker checker;
5658
checker.enableDashBuffering( true );

‎src/core/qgsrenderchecker.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@ bool QgsRenderChecker::compareImages( const QString &testName,
287287
maskImagePath += QLatin1String( "_mask.png" );
288288
const QImage maskImage( maskImagePath );
289289
const bool hasMask = !maskImage.isNull();
290-
if ( hasMask )
291-
{
292-
qDebug( "QgsRenderChecker using mask image" );
293-
}
294290

295291
//
296292
// Set pixel count score and target
@@ -358,10 +354,13 @@ bool QgsRenderChecker::compareImages( const QString &testName,
358354
// Put the same info to debug too
359355
//
360356

361-
qDebug( "Expected size: %dw x %dh", myExpectedImage.width(), myExpectedImage.height() );
362-
qDebug( "Actual size: %dw x %dh", myResultImage.width(), myResultImage.height() );
363-
if ( hasMask )
364-
qDebug( "Mask size: %dw x %dh", maskImage.width(), maskImage.height() );
357+
if ( myExpectedImage.width() != myResultImage.width() || myExpectedImage.height() != myResultImage.height() )
358+
{
359+
qDebug( "Expected size: %dw x %dh", myExpectedImage.width(), myExpectedImage.height() );
360+
qDebug( "Actual size: %dw x %dh", myResultImage.width(), myResultImage.height() );
361+
if ( hasMask )
362+
qDebug( "Mask size: %dw x %dh", maskImage.width(), maskImage.height() );
363+
}
365364

366365
if ( mMatchTarget != myPixelCount )
367366
{
@@ -464,7 +463,10 @@ bool QgsRenderChecker::compareImages( const QString &testName,
464463
//
465464
// Send match result to debug
466465
//
467-
qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, mismatchCount );
466+
if ( mMismatchCount > mismatchCount )
467+
{
468+
qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, mismatchCount );
469+
}
468470

469471
//
470472
// Send match result to report

0 commit comments

Comments
 (0)
Please sign in to comment.