mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
fix regression992 test crash
This commit is contained in:
parent
3d088cf8d3
commit
6e9454d814
@ -33,6 +33,7 @@
|
|||||||
#include <qgsmaplayerregistry.h>
|
#include <qgsmaplayerregistry.h>
|
||||||
#include <qgsapplication.h>
|
#include <qgsapplication.h>
|
||||||
#include <qgsmaprenderer.h>
|
#include <qgsmaprenderer.h>
|
||||||
|
#include <qgsproviderregistry.h>
|
||||||
|
|
||||||
//qgis unit test includes
|
//qgis unit test includes
|
||||||
#include <qgsrenderchecker.h>
|
#include <qgsrenderchecker.h>
|
||||||
@ -63,10 +64,10 @@ class Regression992: public QObject
|
|||||||
void Regression992::initTestCase()
|
void Regression992::initTestCase()
|
||||||
{
|
{
|
||||||
// init QGIS's paths - true means that all path will be inited from prefix
|
// init QGIS's paths - true means that all path will be inited from prefix
|
||||||
QString qgisPath = QCoreApplication::applicationDirPath();
|
QgsApplication::init();
|
||||||
QgsApplication::init( INSTALL_PREFIX );
|
|
||||||
QgsApplication::initQgis();
|
|
||||||
QgsApplication::showSettings();
|
QgsApplication::showSettings();
|
||||||
|
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
|
||||||
|
|
||||||
//create some objects that will be used in all tests...
|
//create some objects that will be used in all tests...
|
||||||
//create a raster layer 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
|
mTestDataDir = QString( TEST_DATA_DIR ) + QDir::separator(); //defined in CMakeLists.txt
|
||||||
@ -104,6 +105,9 @@ void Regression992::cleanupTestCase()
|
|||||||
myFile.close();
|
myFile.close();
|
||||||
//QDesktopServices::openUrl( "file:///" + myReportFile );
|
//QDesktopServices::openUrl( "file:///" + myReportFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete mpRasterLayer;
|
||||||
|
delete mpMapRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Regression992::regression992()
|
void Regression992::regression992()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user