mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
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
This commit is contained in:
parent
652379983d
commit
ada4534450
@ -40,7 +40,6 @@ class TestQgsRenderers: public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT;
|
Q_OBJECT;
|
||||||
private slots:
|
private slots:
|
||||||
QString getQgisPath(); // Gets the path to QGIS installation
|
|
||||||
void initTestCase();// will be called before the first testfunction is executed.
|
void initTestCase();// will be called before the first testfunction is executed.
|
||||||
void cleanupTestCase();// will be called after the last testfunction was executed.
|
void cleanupTestCase();// will be called after the last testfunction was executed.
|
||||||
void init(){};// will be called before each testfunction is executed.
|
void init(){};// will be called before each testfunction is executed.
|
||||||
@ -61,25 +60,13 @@ class TestQgsRenderers: public QObject
|
|||||||
QString mReport;
|
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()
|
void TestQgsRenderers::initTestCase()
|
||||||
{
|
{
|
||||||
// init QGIS's paths - true means that all path will be inited from prefix
|
// init QGIS's paths - true means that all path will be inited from prefix
|
||||||
//QString qgisPath = QCoreApplication::applicationDirPath ();
|
QString qgisPath = QCoreApplication::applicationDirPath ();
|
||||||
QgsApplication::setPrefixPath(getQgisPath(), TRUE);
|
QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
|
||||||
#ifdef Q_OS_LINUX
|
QgsApplication::showSettings();
|
||||||
// QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
|
|
||||||
// QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
|
|
||||||
#endif
|
|
||||||
// Instantiate the plugin directory so that providers are loaded
|
// Instantiate the plugin directory so that providers are loaded
|
||||||
QgsProviderRegistry::instance(QgsApplication::pluginPath());
|
QgsProviderRegistry::instance(QgsApplication::pluginPath());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user