diff --git a/tests/src/core/testqgsmaprender.cpp b/tests/src/core/testqgsmaprender.cpp index 9da9a066806c..eb7211b16f95 100644 --- a/tests/src/core/testqgsmaprender.cpp +++ b/tests/src/core/testqgsmaprender.cpp @@ -74,19 +74,16 @@ class TestQgsMapRender: public QObject void TestQgsMapRender::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(qgisPath, TRUE); -#ifdef Q_OS_LINUX - QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis"); - QgsApplication::setPluginPath(qgisPath + "/../lib/qgis"); -#endif + QgsApplication::setPrefixPath(INSTALL_PREFIX, true); + QgsApplication::showSettings(); // Instantiate the plugin directory so that providers are loaded QgsProviderRegistry::instance(QgsApplication::pluginPath()); - 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 some objects that will be used in all tests... mEncoding = "UTF-8";