Skip to content

Instantly share code, notes, and snippets.

@jef-n
Created February 7, 2012 20:19
Show Gist options
  • Save jef-n/1761706 to your computer and use it in GitHub Desktop.
Save jef-n/1761706 to your computer and use it in GitHub Desktop.
diff --git a/src/core/qgsapplication.cpp b/src/core/qgsapplication.cpp
index 32f3eaf..a37fd18a 100644
--- a/src/core/qgsapplication.cpp
+++ b/src/core/qgsapplication.cpp
@@ -47,7 +47,7 @@ QString ABISYM( QgsApplication::mLibraryPath );
QString ABISYM( QgsApplication::mLibexecPath );
QString ABISYM( QgsApplication::mThemeName );
QStringList ABISYM( QgsApplication::mDefaultSvgPaths );
-QString ABISYM( QgsApplication::mConfigPath ) = QDir::homePath() + QString( "/.qgis/" );
+QString ABISYM( QgsApplication::mConfigPath );
bool ABISYM( QgsApplication::mRunningFromBuildDir ) = false;
QString ABISYM( QgsApplication::mBuildSourcePath );
QString ABISYM( QgsApplication::mBuildOutputPath );
@@ -73,6 +73,10 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled, QStri
}
void QgsApplication::init( QString customConfigPath )
{
+ if( customConfigPath.isEmpty() )
+ {
+ customConfigPath = QDir::homePath() + QString( "/.qgis/" );
+ }
qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );
// check if QGIS is run from build directory (not the install directory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment