Skip to content

Commit

Permalink
fix regression992 test crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 23, 2012
1 parent 3d088cf commit 6e9454d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/src/core/regression992.cpp
Expand Up @@ -33,6 +33,7 @@
#include <qgsmaplayerregistry.h>
#include <qgsapplication.h>
#include <qgsmaprenderer.h>
#include <qgsproviderregistry.h>

//qgis unit test includes
#include <qgsrenderchecker.h>
Expand Down Expand Up @@ -63,10 +64,10 @@ class Regression992: public QObject
void Regression992::initTestCase()
{
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::init( INSTALL_PREFIX );
QgsApplication::initQgis();
QgsApplication::init();
QgsApplication::showSettings();
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...
//create a raster layer that will be used in all tests...
mTestDataDir = QString( TEST_DATA_DIR ) + QDir::separator(); //defined in CMakeLists.txt
Expand Down Expand Up @@ -104,6 +105,9 @@ void Regression992::cleanupTestCase()
myFile.close();
//QDesktopServices::openUrl( "file:///" + myReportFile );
}

delete mpRasterLayer;
delete mpMapRenderer;
}

void Regression992::regression992()
Expand Down

0 comments on commit 6e9454d

Please sign in to comment.