Skip to content

Commit 82135a7

Browse files
committed
Added env var for custom plugin directory
1 parent 4c6bf30 commit 82135a7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/qgsapplication.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ void QgsApplication::init( QString customConfigPath )
9393
{
9494
if ( customConfigPath.isEmpty() )
9595
{
96-
customConfigPath = QString( "%1/.qgis%2/" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
96+
if ( getenv( "QGIS_CUSTOM_CONFIG_PATH" ) )
97+
{
98+
customConfigPath = getenv( "QGIS_CUSTOM_CONFIG_PATH" );
99+
}
100+
else
101+
{
102+
customConfigPath = QString( "%1/.qgis%2/" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
103+
}
97104
}
98105

99106
qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );

0 commit comments

Comments
 (0)