Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed paths on WinXP for application test
git-svn-id: http://svn.osgeo.org/qgis/trunk@7919 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 10, 2008
1 parent 04d0453 commit db0ca5b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/src/core/testqgsapplication.cpp
Expand Up @@ -33,9 +33,12 @@ class TestQgsApplication: public QObject
void TestQgsApplication::getPaths()
{
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath () + "/../";
QString qgisPath = QCoreApplication::applicationDirPath ();
QgsApplication::setPrefixPath(qgisPath, TRUE);

#ifdef Q_OS_LINUX
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
#endif
std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
Expand All @@ -45,8 +48,12 @@ void TestQgsApplication::getPaths()

void TestQgsApplication::checkTheme()
{
QString qgisPath = QCoreApplication::applicationDirPath () + "/../";
QString qgisPath = QCoreApplication::applicationDirPath ();
QgsApplication::setPrefixPath(qgisPath, TRUE);
#ifdef Q_OS_LINUX
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
QgsApplication::setPluginPath(qgisPath + "/../lib/qgis");
#endif
std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
Expand Down

0 comments on commit db0ca5b

Please sign in to comment.