Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
python's expanduser doesn't necessarily returns utf-8 (followup 4cb37b1)
  • Loading branch information
jef-n committed Oct 12, 2013
1 parent adc850e commit 17fc3e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -85,7 +85,7 @@ void QgsApplication::init( QString customConfigPath )
{
if ( customConfigPath.isEmpty() )
{
customConfigPath = QDir::homePath() + QString( "/.qgis%1/" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ );
customConfigPath = QString( "%1/.qgis%2/" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
}

qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );
Expand Down
4 changes: 2 additions & 2 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -487,9 +487,9 @@ QString QgsPythonUtilsImpl::pluginsPath()
QString QgsPythonUtilsImpl::homePythonPath()
{
QString settingsDir = QgsApplication::qgisSettingsDirPath();
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ ) )
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( QGis::QGIS_VERSION_INT / 10000 ) )
{
return QString( "os.path.expanduser(\"~/.qgis%1/python\").decode('utf-8')" ).arg( 2 /* FIXME: QGis::QGIS_VERSION_INT / 10000 */ );
return QString( "\"%1/.qgis%2/python\".decode('utf-8')" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
}
else
{
Expand Down

0 comments on commit 17fc3e9

Please sign in to comment.