[QGIS Commit] r8714 - trunk/qgis/tests/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Jul 6 07:46:51 EDT 2008
Author: timlinux
Date: 2008-07-06 07:46:51 -0400 (Sun, 06 Jul 2008)
New Revision: 8714
Modified:
trunk/qgis/tests/src/core/testqgsrenderers.cpp
Log:
Use new mechanism to find path. Test still fails due to small differences in rendered output
Modified: trunk/qgis/tests/src/core/testqgsrenderers.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrenderers.cpp 2008-07-06 11:41:07 UTC (rev 8713)
+++ trunk/qgis/tests/src/core/testqgsrenderers.cpp 2008-07-06 11:46:51 UTC (rev 8714)
@@ -40,7 +40,6 @@
{
Q_OBJECT;
private slots:
- QString getQgisPath(); // Gets the path to QGIS installation
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
void init(){};// will be called before each testfunction is executed.
@@ -61,25 +60,13 @@
QString mReport;
};
-QString TestQgsRenderers::getQgisPath()
-{
-#ifdef Q_OS_LINUX
- QString qgisPath = QCoreApplication::applicationDirPath () + "/../";
-#else //mac and win
- QString qgisPath = QCoreApplication::applicationDirPath () ;
-#endif
- return qgisPath;
-}
void TestQgsRenderers::initTestCase()
{
// init QGIS's paths - true means that all path will be inited from prefix
- //QString qgisPath = QCoreApplication::applicationDirPath ();
- QgsApplication::setPrefixPath(getQgisPath(), TRUE);
-#ifdef Q_OS_LINUX
-// QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
-// QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
-#endif
+ QString qgisPath = QCoreApplication::applicationDirPath ();
+ QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
+ QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance(QgsApplication::pluginPath());
More information about the QGIS-commit
mailing list