Skip to content

Commit 4447ea5

Browse files
author
jef
committed
fix build error on windows
git-svn-id: http://svn.osgeo.org/qgis/trunk@14479 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5ec236c commit 4447ea5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/core/qgsapplication.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ void QgsApplication::registerOgrDrivers()
483483
}
484484
}
485485

486-
QString QgsApplication::absolutePathToRelativePath( const QString& apath, const QString& targetPath )
486+
QString QgsApplication::absolutePathToRelativePath( QString aPath, QString targetPath )
487487
{
488488
#if defined( Q_OS_WIN )
489489
const Qt::CaseSensitivity cs = Qt::CaseInsensitive;
@@ -506,7 +506,7 @@ QString QgsApplication::absolutePathToRelativePath( const QString& apath, const
506506
#endif
507507

508508
QStringList targetElems = targetPath.split( "/", QString::SkipEmptyParts );
509-
QStringList aPathElems = apath.split( "/", QString::SkipEmptyParts );
509+
QStringList aPathElems = aPath.split( "/", QString::SkipEmptyParts );
510510

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

525525
if ( n == 0 )
526526
{
527-
// no common parts; might not even by a file
528-
return apath;
527+
// no common parts; might not even be a file
528+
return aPath;
529529
}
530530

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

549-
QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const QString& targetPath )
549+
QString QgsApplication::relativePathToAbsolutePath( QString rpath, QString targetPath )
550550
{
551551
// relative path should always start with ./ or ../
552552
if ( !rpath.startsWith( "./" ) && !rpath.startsWith( "../" ) )
@@ -555,7 +555,7 @@ QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const
555555
}
556556

557557
#if defined(Q_OS_WIN)
558-
rPath.replace( "\\", "/" );
558+
rpath.replace( "\\", "/" );
559559
targetPath.replace( "\\", "/" );
560560

561561
bool uncPath = targetPath.startsWith( "//" );

src/core/qgsapplication.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ class CORE_EXPORT QgsApplication: public QApplication
194194

195195
/**Converts absolute path to path relative to target
196196
@note: this method was added in version 1.6*/
197-
static QString absolutePathToRelativePath( const QString& apath, const QString& targetPath );
197+
static QString absolutePathToRelativePath( QString apath, QString targetPath );
198198
/**Converts path relative to target to an absolute path
199199
@note: this method was added in version 1.6*/
200-
static QString relativePathToAbsolutePath( const QString& rpath, const QString& targetPath );
200+
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
201201

202202
private:
203203
static QString mPrefixPath;

0 commit comments

Comments
 (0)