Skip to content

Commit db0ca5b

Browse files
author
homann
committedJan 10, 2008
Fixed paths on WinXP for application test
git-svn-id: http://svn.osgeo.org/qgis/trunk@7919 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 04d0453 commit db0ca5b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed
 

‎tests/src/core/testqgsapplication.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ class TestQgsApplication: public QObject
3333
void TestQgsApplication::getPaths()
3434
{
3535
// init QGIS's paths - true means that all path will be inited from prefix
36-
QString qgisPath = QCoreApplication::applicationDirPath () + "/../";
36+
QString qgisPath = QCoreApplication::applicationDirPath ();
3737
QgsApplication::setPrefixPath(qgisPath, TRUE);
38-
38+
#ifdef Q_OS_LINUX
39+
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
40+
QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
41+
#endif
3942
std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
4043
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
4144
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
@@ -45,8 +48,12 @@ void TestQgsApplication::getPaths()
4548

4649
void TestQgsApplication::checkTheme()
4750
{
48-
QString qgisPath = QCoreApplication::applicationDirPath () + "/../";
51+
QString qgisPath = QCoreApplication::applicationDirPath ();
4952
QgsApplication::setPrefixPath(qgisPath, TRUE);
53+
#ifdef Q_OS_LINUX
54+
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
55+
QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
56+
#endif
5057
std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
5158
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
5259
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;

0 commit comments

Comments
 (0)
Please sign in to comment.