Skip to content

Commit e3f25da

Browse files
committedMay 19, 2012
trim proj4 parameters for sql queries (#5598)
1 parent 56808d9 commit e3f25da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,10 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
496496

497497
// split on spaces followed by a plus sign (+) to deal
498498
// also with parameters containing spaces (e.g. +nadgrids)
499+
// make sure result is trimmed (#5598)
499500
foreach( QString param, theProj4String.split( QRegExp( "\\s+(?=\\+)" ), QString::SkipEmptyParts ) )
500501
{
501-
QString arg = QString( "' '||parameters||' ' LIKE %1" ).arg( quotedValue( QString( "% %1 %" ).arg( param ) ) );
502+
QString arg = QString( "' '||parameters||' ' LIKE %1" ).arg( quotedValue( QString( "% %1 %" ).arg( param.trimmed() ) ) );
502503
if ( param.startsWith( "+datum=" ) )
503504
{
504505
datum = arg;

0 commit comments

Comments
 (0)
Please sign in to comment.