Skip to content
Permalink
Browse files

Less debug noise

  • Loading branch information
nyalldawson committed May 1, 2020
1 parent a934f0f commit e9f024b05c4e4e6f8b86ef3e20cf9105371da3db
Showing with 17 additions and 13 deletions.
  1. +1 −1 src/core/qgsdatasourceuri.cpp
  2. +5 −3 src/core/qgsmultirenderchecker.cpp
  3. +11 −9 src/core/qgsrenderchecker.cpp
@@ -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;
}

@@ -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 );
@@ -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
@@ -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 )
{
@@ -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

0 comments on commit e9f024b

Please sign in to comment.
You can’t perform that action at this time.