Skip to content

Commit

Permalink
Fix #6764 again. Replace backslash for python code only
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Nov 28, 2012
1 parent e97afe0 commit 84c709f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,6 @@ int main( int argc, char *argv[] )

if ( !optionpath.isEmpty() || !configpath.isEmpty() )
{
#ifdef Q_WS_WIN
//replace backslashes with forward slashes
configpath.replace( "\\", "/" );
optionpath.replace( "\\", "/" );
#endif
// tell QSettings to use INI format and save the file in custom config path
QSettings::setDefaultFormat( QSettings::IniFormat );
QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, optionpath.isEmpty() ? configpath : optionpath );
Expand All @@ -537,11 +532,6 @@ int main( int argc, char *argv[] )
QSettings* customizationsettings;
if ( !optionpath.isEmpty() || !configpath.isEmpty() )
{
#ifdef Q_WS_WIN
//replace backslashes with forward slashes
configpath.replace( "\\", "/" );
optionpath.replace( "\\", "/" );
#endif
// tell QSettings to use INI format and save the file in custom config path
QSettings::setDefaultFormat( QSettings::IniFormat );
QString path = optionpath.isEmpty() ? configpath : optionpath;
Expand Down
2 changes: 1 addition & 1 deletion src/python/qgspythonutilsimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ QString QgsPythonUtilsImpl::homePythonPath()
}
else
{
return '"' + settingsDir + "python\"";
return '"' + settingsDir.replace( '\\', "\\\\" ) + "python\"";
}
}

Expand Down

0 comments on commit 84c709f

Please sign in to comment.