Skip to content
Permalink
Browse files

Added comment about origin of qgis path var

  • Loading branch information
timlinux committed Sep 7, 2012
1 parent 26dc406 commit 85b4a360fcead6fc8d1724bc605840e5c62e3eaa
Showing with 18 additions and 1 deletion.
  1. +18 −1 tests/src/python/utilities.py
@@ -67,8 +67,25 @@ def getQgisTestApp():

if QGISAPP is None:
myGuiFlag = True # All test will run qgis in gui mode

QGISAPP = QgsApplication(sys.argv, myGuiFlag)
# Note: QGIS_PREFIX_PATH is set by cmake to the output dir
if 'QGIS_PREFIX_PATH' in os.environ:
myPath = os.environ['QGIS_PREFIX_PATH']
myUseDefaultPathFlag = True
QGISAPP.setPrefixPath(myPath, myUseDefaultPathFlag)

if sys.platform.startswith('darwin'):
# override resource paths, otherwise looks for Resources in app
if 'QGIS_MAC_PKGDATA_DIR' in os.environ:
myPkgPath = os.environ['QGIS_MAC_PKGDATA_DIR']
QGISAPP.setPkgDataPath(myPkgPath)
if 'QGIS_MAC_SVG_DIR' in os.environ:
mySVGPath = os.environ['QGIS_MAC_SVG_DIR']
mySVGPaths = QGISAPP.svgPaths()
# doesn't get rid of incorrect path, just adds correct one
mySVGPaths.prepend(mySVGPath)
QGISAPP.setDefaultSvgPaths(mySVGPaths)

QGISAPP.initQgis()
s = QGISAPP.showSettings()
print s

0 comments on commit 85b4a36

Please sign in to comment.
You can’t perform that action at this time.