Use new prefix path mechanism to locate resources

git-svn-id: http://svn.osgeo.org/qgis/trunk@8713 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2008-07-06 11:41:07 +00:00
parent 63b3d29180
commit 652379983d

View File

@ -70,17 +70,9 @@ void TestQgsRasterLayer::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(qgisPath, TRUE); QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
#ifdef Q_OS_LINUX QgsApplication::showSettings();
QgsApplication::setPkgDataPath(qgisPath + "/../share/qgis");
#endif
//create some objects that will be used in all tests... //create some objects that will be used in all tests...
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;
std::cout << "User DB PATH: " << QgsApplication::qgisUserDbFilePath().toLocal8Bit().data() << std::endl;
//create a raster layer that will be used in all tests... //create a raster layer that will be used in all tests...
mTestDataDir = QString(TEST_DATA_DIR) + QDir::separator(); //defined in CmakeLists.txt mTestDataDir = QString(TEST_DATA_DIR) + QDir::separator(); //defined in CmakeLists.txt
QString myFileName = mTestDataDir + "tenbytenraster.asc"; QString myFileName = mTestDataDir + "tenbytenraster.asc";