[QGIS Commit] r14479 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Nov 1 08:31:53 EDT 2010
Author: jef
Date: 2010-11-01 05:31:53 -0700 (Mon, 01 Nov 2010)
New Revision: 14479
Modified:
trunk/qgis/src/core/qgsapplication.cpp
trunk/qgis/src/core/qgsapplication.h
Log:
fix build error on windows
Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp 2010-11-01 12:30:35 UTC (rev 14478)
+++ trunk/qgis/src/core/qgsapplication.cpp 2010-11-01 12:31:53 UTC (rev 14479)
@@ -483,7 +483,7 @@
}
}
-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;
@@ -506,7 +506,7 @@
#endif
QStringList targetElems = targetPath.split( "/", QString::SkipEmptyParts );
- QStringList aPathElems = apath.split( "/", QString::SkipEmptyParts );
+ QStringList aPathElems = aPath.split( "/", QString::SkipEmptyParts );
targetElems.removeAll( "." );
aPathElems.removeAll( "." );
@@ -524,8 +524,8 @@
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 )
@@ -546,7 +546,7 @@
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( "../" ) )
@@ -555,7 +555,7 @@
}
#if defined(Q_OS_WIN)
- rPath.replace( "\\", "/" );
+ rpath.replace( "\\", "/" );
targetPath.replace( "\\", "/" );
bool uncPath = targetPath.startsWith( "//" );
Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h 2010-11-01 12:30:35 UTC (rev 14478)
+++ trunk/qgis/src/core/qgsapplication.h 2010-11-01 12:31:53 UTC (rev 14479)
@@ -194,10 +194,10 @@
/**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;
More information about the QGIS-commit
mailing list