@@ -35,7 +35,6 @@ class TestQgsGeometry: public QObject
35
35
{
36
36
Q_OBJECT;
37
37
private slots:
38
- QString getQgisPath (); // Gets the path to QGIS installation
39
38
void initTestCase ();// will be called before the first testfunction is executed.
40
39
void cleanupTestCase ();// will be called after the last testfunction was executed.
41
40
void init ();// will be called before each testfunction is executed.
@@ -64,15 +63,6 @@ class TestQgsGeometry: public QObject
64
63
QString mTestDataDir ;
65
64
};
66
65
67
- QString TestQgsGeometry::getQgisPath ()
68
- {
69
- #ifdef Q_OS_LINUX
70
- QString qgisPath = QCoreApplication::applicationDirPath () + " /../" ;
71
- #else // mac and win
72
- QString qgisPath = QCoreApplication::applicationDirPath () ;
73
- #endif
74
- return qgisPath;
75
- }
76
66
77
67
void TestQgsGeometry::init ()
78
68
{
@@ -118,19 +108,11 @@ void TestQgsGeometry::initTestCase()
118
108
// Runs once before any tests are run
119
109
//
120
110
// init QGIS's paths - true means that all path will be inited from prefix
121
- // QString qgisPath = QCoreApplication::applicationDirPath ();
122
- QgsApplication::setPrefixPath (getQgisPath (), TRUE );
123
- #ifdef Q_OS_LINUX
124
- // QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
125
- // QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
126
- #endif
127
-
128
- std::cout << " Prefix PATH: " << QgsApplication::prefixPath ().toLocal8Bit ().data () << std::endl;
129
- std::cout << " Plugin PATH: " << QgsApplication::pluginPath ().toLocal8Bit ().data () << std::endl;
130
- std::cout << " PkgData PATH: " << QgsApplication::pkgDataPath ().toLocal8Bit ().data () << std::endl;
131
- std::cout << " User DB PATH: " << QgsApplication::qgisUserDbFilePath ().toLocal8Bit ().data () << std::endl;
132
-
111
+ QString qgisPath = QCoreApplication::applicationDirPath ();
112
+ QgsApplication::setPrefixPath (INSTALL_PREFIX, true );
113
+ QgsApplication::showSettings ();
133
114
}
115
+
134
116
void TestQgsGeometry::cleanupTestCase ()
135
117
{
136
118
//
0 commit comments