mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
Added comment about origin of qgis path var
This commit is contained in:
parent
26dc40676d
commit
85b4a360fc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user