12 changes: 2 additions & 10 deletions tests/src/core/testqgsrenderers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,12 @@ void TestQgsRenderers::initTestCase()
{
mTestHasError = false;
// 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::initQgis();
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...

std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
std::cout << "User DB PATH: " << QgsApplication::qgisUserDbFilePath().toLocal8Bit().data() << std::endl;

//
//create a point layer that will be used in all tests...
Expand Down Expand Up @@ -225,4 +218,3 @@ bool TestQgsRenderers::imageCheck( QString theTestType )

QTEST_MAIN( TestQgsRenderers )
#include "moc_testqgsrenderers.cxx"

3 changes: 1 addition & 2 deletions tests/src/core/testqgsvectorfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ void TestQgsVectorFileWriter::initTestCase()
"(the ERROR comes from OGR and is not very intuitive)\n"
"******************\n" );
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::init();
QgsApplication::showSettings();
//create some objects that will be used in all tests...

Expand Down
12 changes: 1 addition & 11 deletions tests/src/core/testqgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,11 @@ class TestQgsVectorLayer: public QObject
{
mTestHasError = false;
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...

std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
std::cout << "User DB PATH: " << QgsApplication::qgisUserDbFilePath().toLocal8Bit().data() << std::endl;

//
//create a non spatial layer that will be used in all tests...
//
Expand Down Expand Up @@ -649,7 +643,3 @@ class TestQgsVectorLayer: public QObject

QTEST_MAIN( TestQgsVectorLayer )
#include "moc_testqgsvectorlayer.cxx"




3 changes: 1 addition & 2 deletions tests/src/core/testziplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int TestZipLayer::getLayerTransparency( QString myFileName, QString myProviderKe
void TestZipLayer::initTestCase()
{
QgsApplication::init();
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
QgsApplication::initQgis();
// save data dir
mDataDir = QString( TEST_DATA_DIR ) + QDir::separator();
// set zipSetting to 1 (Passthru) and save current value
Expand Down Expand Up @@ -358,6 +358,5 @@ void TestZipLayer::testGZipItemRasterTransparency()
QVERIFY2(( myTransparency == myTarget ), QString( "Transparency is %1, should be %2" ).arg( myTransparency ).arg( myTarget ).toLocal8Bit().data() );
}


QTEST_MAIN( TestZipLayer )
#include "moc_testziplayer.cxx"
4 changes: 2 additions & 2 deletions tests/src/gui/testqgsmaptoolzoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class TestQgsMapToolZoom: public QObject

void TestQgsMapToolZoom::initTestCase()
{
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
}

Expand Down
6 changes: 2 additions & 4 deletions tests/src/gui/testqgsquickprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ void TestQgsQuickPrint::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication.init();
QgsApplication.initQgis();
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//
//create a point layer that will be used in all tests...
Expand Down
156 changes: 0 additions & 156 deletions tests/src/runtests.sh

This file was deleted.