File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ class TestQgsRenderers: public QObject
4040{
4141 Q_OBJECT;
4242 private slots:
43- QString getQgisPath (); // Gets the path to QGIS installation
4443 void initTestCase ();// will be called before the first testfunction is executed.
4544 void cleanupTestCase ();// will be called after the last testfunction was executed.
4645 void init (){};// will be called before each testfunction is executed.
@@ -61,25 +60,13 @@ class TestQgsRenderers: public QObject
6160 QString mReport ;
6261};
6362
64- QString TestQgsRenderers::getQgisPath ()
65- {
66- #ifdef Q_OS_LINUX
67- QString qgisPath = QCoreApplication::applicationDirPath () + " /../" ;
68- #else // mac and win
69- QString qgisPath = QCoreApplication::applicationDirPath () ;
70- #endif
71- return qgisPath;
72- }
7363
7464void TestQgsRenderers::initTestCase ()
7565{
7666 // init QGIS's paths - true means that all path will be inited from prefix
77- // QString qgisPath = QCoreApplication::applicationDirPath ();
78- QgsApplication::setPrefixPath (getQgisPath (), TRUE );
79- #ifdef Q_OS_LINUX
80- // QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
81- // QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
82- #endif
67+ QString qgisPath = QCoreApplication::applicationDirPath ();
68+ QgsApplication::setPrefixPath (INSTALL_PREFIX, true );
69+ QgsApplication::showSettings ();
8370 // Instantiate the plugin directory so that providers are loaded
8471 QgsProviderRegistry::instance (QgsApplication::pluginPath ());
8572
You can’t perform that action at this time.
0 commit comments