Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix build error on windows
git-svn-id: http://svn.osgeo.org/qgis/trunk@14479 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 1, 2010
1 parent 5ec236c commit 4447ea5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/core/qgsapplication.cpp
Expand Up @@ -483,7 +483,7 @@ void QgsApplication::registerOgrDrivers()
}
}

QString QgsApplication::absolutePathToRelativePath( const QString& apath, const QString& targetPath )
QString QgsApplication::absolutePathToRelativePath( QString aPath, QString targetPath )
{
#if defined( Q_OS_WIN )
const Qt::CaseSensitivity cs = Qt::CaseInsensitive;
Expand All @@ -506,7 +506,7 @@ QString QgsApplication::absolutePathToRelativePath( const QString& apath, const
#endif

QStringList targetElems = targetPath.split( "/", QString::SkipEmptyParts );
QStringList aPathElems = apath.split( "/", QString::SkipEmptyParts );
QStringList aPathElems = aPath.split( "/", QString::SkipEmptyParts );

targetElems.removeAll( "." );
aPathElems.removeAll( "." );
Expand All @@ -524,8 +524,8 @@ QString QgsApplication::absolutePathToRelativePath( const QString& apath, const

if ( n == 0 )
{
// no common parts; might not even by a file
return apath;
// no common parts; might not even be a file
return aPath;
}

if ( targetElems.size() > 0 )
Expand All @@ -546,7 +546,7 @@ QString QgsApplication::absolutePathToRelativePath( const QString& apath, const
return aPathElems.join( "/" );
}

QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const QString& targetPath )
QString QgsApplication::relativePathToAbsolutePath( QString rpath, QString targetPath )
{
// relative path should always start with ./ or ../
if ( !rpath.startsWith( "./" ) && !rpath.startsWith( "../" ) )
Expand All @@ -555,7 +555,7 @@ QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const
}

#if defined(Q_OS_WIN)
rPath.replace( "\\", "/" );
rpath.replace( "\\", "/" );
targetPath.replace( "\\", "/" );

bool uncPath = targetPath.startsWith( "//" );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsapplication.h
Expand Up @@ -194,10 +194,10 @@ class CORE_EXPORT QgsApplication: public QApplication

/**Converts absolute path to path relative to target
@note: this method was added in version 1.6*/
static QString absolutePathToRelativePath( const QString& apath, const QString& targetPath );
static QString absolutePathToRelativePath( QString apath, QString targetPath );
/**Converts path relative to target to an absolute path
@note: this method was added in version 1.6*/
static QString relativePathToAbsolutePath( const QString& rpath, const QString& targetPath );
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );

private:
static QString mPrefixPath;
Expand Down

0 comments on commit 4447ea5

Please sign in to comment.