Skip to content

Commit ada4534

Browse files
author
timlinux
committedJul 6, 2008
Use new mechanism to find path. Test still fails due to small differences in rendered output
git-svn-id: http://svn.osgeo.org/qgis/trunk@8714 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6523799 commit ada4534

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed
 

‎tests/src/core/testqgsrenderers.cpp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff 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

7464
void 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

0 commit comments

Comments
 (0)
Please sign in to comment.