Skip to content

Commit 1e80162

Browse files
author
timlinux
committed
Use new prefix path mechanism to locate resources
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8713 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4d7bdc1 commit 1e80162

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/src/core/testqgsrasterlayer.cpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,9 @@ void TestQgsRasterLayer::initTestCase()
7070
{
7171
// init QGIS's paths - true means that all path will be inited from prefix
7272
QString qgisPath = QCoreApplication::applicationDirPath ();
73-
QgsApplication::setPrefixPath(qgisPath, TRUE);
74-
#ifdef Q_OS_LINUX
75-
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
76-
#endif
73+
QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
74+
QgsApplication::showSettings();
7775
//create some objects that will be used in all tests...
78-
79-
std::cout << "Prefix PATH: " << QgsApplication::prefixPath().toLocal8Bit().data() << std::endl;
80-
std::cout << "Plugin PATH: " << QgsApplication::pluginPath().toLocal8Bit().data() << std::endl;
81-
std::cout << "PkgData PATH: " << QgsApplication::pkgDataPath().toLocal8Bit().data() << std::endl;
82-
std::cout << "User DB PATH: " << QgsApplication::qgisUserDbFilePath().toLocal8Bit().data() << std::endl;
83-
8476
//create a raster layer that will be used in all tests...
8577
mTestDataDir = QString(TEST_DATA_DIR) + QDir::separator(); //defined in CmakeLists.txt
8678
QString myFileName = mTestDataDir + "tenbytenraster.asc";

0 commit comments

Comments
 (0)