Skip to content

Commit

Permalink
Ensure unique ids are generated whenever tests are run multiple times
Browse files Browse the repository at this point in the history
Avoids layout corruption in the generated html reports if the same test
is run more than once
  • Loading branch information
nyalldawson committed Jan 9, 2020
1 parent b9b4f88 commit f4f8a53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/qgsrenderchecker.cpp
Expand Up @@ -28,8 +28,6 @@
#include <QDebug>
#include <QBuffer>

static int sRenderCounter = 0;


QString QgsRenderChecker::controlImagePath() const
{
Expand Down Expand Up @@ -344,7 +342,7 @@ bool QgsRenderChecker::compareImages( const QString &testName,
mRenderedImageFile,
mExpectedImageFile )
.arg( imgWidth ).arg( imgHeight )
.arg( sRenderCounter++ );
.arg( QUuid::createUuid().toString().mid( 1, 6 ) );

QString prefix;
if ( !mControlPathPrefix.isNull() )
Expand Down

0 comments on commit f4f8a53

Please sign in to comment.