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
40
40
{
41
41
Q_OBJECT;
42
42
private slots:
43
- QString getQgisPath (); // Gets the path to QGIS installation
44
43
void initTestCase ();// will be called before the first testfunction is executed.
45
44
void cleanupTestCase ();// will be called after the last testfunction was executed.
46
45
void init (){};// will be called before each testfunction is executed.
@@ -61,25 +60,13 @@ class TestQgsRenderers: public QObject
61
60
QString mReport ;
62
61
};
63
62
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
- }
73
63
74
64
void TestQgsRenderers::initTestCase ()
75
65
{
76
66
// 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 ();
83
70
// Instantiate the plugin directory so that providers are loaded
84
71
QgsProviderRegistry::instance (QgsApplication::pluginPath ());
85
72
You can’t perform that action at this time.
0 commit comments