Skip to content

Commit 17fc3e9

Browse files
committedOct 12, 2013
python's expanduser doesn't necessarily returns utf-8 (followup 4cb37b1)
1 parent adc850e commit 17fc3e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/core/qgsapplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void QgsApplication::init( QString customConfigPath )
8585
{
8686
if ( customConfigPath.isEmpty() )
8787
{
88-
customConfigPath = QDir::homePath() + QString( "/.qgis%1/" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ );
88+
customConfigPath = QString( "%1/.qgis%2/" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
8989
}
9090

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

‎src/python/qgspythonutilsimpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ QString QgsPythonUtilsImpl::pluginsPath()
487487
QString QgsPythonUtilsImpl::homePythonPath()
488488
{
489489
QString settingsDir = QgsApplication::qgisSettingsDirPath();
490-
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ ) )
490+
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( QGis::QGIS_VERSION_INT / 10000 ) )
491491
{
492-
return QString( "os.path.expanduser(\"~/.qgis%1/python\").decode('utf-8')" ).arg( 2 /* FIXME: QGis::QGIS_VERSION_INT / 10000 */ );
492+
return QString( "\"%1/.qgis%2/python\".decode('utf-8')" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
493493
}
494494
else
495495
{

0 commit comments

Comments
 (0)
Please sign in to comment.