Navigation Menu

Skip to content

Commit

Permalink
Less debug noise
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 3, 2020
1 parent a934f0f commit e9f024b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsdatasourceuri.cpp
Expand Up @@ -58,7 +58,7 @@ QgsDataSourceUri::QgsDataSourceUri( const QString &u )

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

Expand Down
8 changes: 5 additions & 3 deletions src/core/qgsmultirenderchecker.cpp
Expand Up @@ -47,10 +47,12 @@ bool QgsMultiRenderChecker::runTest( const QString &testName, unsigned int misma

QVector<QgsDartMeasurement> dartMeasurements;

const auto constSubDirs = subDirs;
for ( const QString &suffix : constSubDirs )
for ( const QString &suffix : qgis::as_const( subDirs ) )
{
qDebug() << "Checking subdir " << suffix;
if ( subDirs.count() > 1 )
{
qDebug() << "Checking subdir " << suffix;
}
bool result;
QgsRenderChecker checker;
checker.enableDashBuffering( true );
Expand Down
20 changes: 11 additions & 9 deletions src/core/qgsrenderchecker.cpp
Expand Up @@ -287,10 +287,6 @@ bool QgsRenderChecker::compareImages( const QString &testName,
maskImagePath += QLatin1String( "_mask.png" );
const QImage maskImage( maskImagePath );
const bool hasMask = !maskImage.isNull();
if ( hasMask )
{
qDebug( "QgsRenderChecker using mask image" );
}

//
// Set pixel count score and target
Expand Down Expand Up @@ -358,10 +354,13 @@ bool QgsRenderChecker::compareImages( const QString &testName,
// Put the same info to debug too
//

qDebug( "Expected size: %dw x %dh", myExpectedImage.width(), myExpectedImage.height() );
qDebug( "Actual size: %dw x %dh", myResultImage.width(), myResultImage.height() );
if ( hasMask )
qDebug( "Mask size: %dw x %dh", maskImage.width(), maskImage.height() );
if ( myExpectedImage.width() != myResultImage.width() || myExpectedImage.height() != myResultImage.height() )
{
qDebug( "Expected size: %dw x %dh", myExpectedImage.width(), myExpectedImage.height() );
qDebug( "Actual size: %dw x %dh", myResultImage.width(), myResultImage.height() );
if ( hasMask )
qDebug( "Mask size: %dw x %dh", maskImage.width(), maskImage.height() );
}

if ( mMatchTarget != myPixelCount )
{
Expand Down Expand Up @@ -464,7 +463,10 @@ bool QgsRenderChecker::compareImages( const QString &testName,
//
// Send match result to debug
//
qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, mismatchCount );
if ( mMismatchCount > mismatchCount )
{
qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, mismatchCount );
}

//
// Send match result to report
Expand Down

0 comments on commit e9f024b

Please sign in to comment.