Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use case insensitive comparison for column names. Fixes #3298
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14932 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 16, 2010
1 parent 8632d73 commit a0a4cd8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/qgssearchtreenode.cpp
Expand Up @@ -602,7 +602,7 @@ QgsSearchTreeValue QgsSearchTreeNode::valueAgainst( const QgsFieldMap& fields, Q
QgsFieldMap::const_iterator it;
for ( it = fields.begin(); it != fields.end(); it++ )
{
if ( it->name().toLower() == mText.toLower() ) // TODO: optimize
if ( QString::compare( it->name(), mText, Qt::CaseInsensitive ) == 0 )
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectordataprovider.cpp
Expand Up @@ -221,7 +221,7 @@ int QgsVectorDataProvider::fieldNameIndex( const QString& fieldName ) const

for ( QgsFieldMap::const_iterator it = theFields.constBegin(); it != theFields.constEnd(); ++it )
{
if ( it->name() == fieldName )
if ( QString::compare( it->name(), fieldName, Qt::CaseInsensitive ) == 0 )
{
return it.key();
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -4720,7 +4720,7 @@ int QgsVectorLayer::fieldNameIndex( const QString& fieldName ) const

for ( QgsFieldMap::const_iterator it = theFields.constBegin(); it != theFields.constEnd(); ++it )
{
if ( it->name() == fieldName )
if ( QString::compare( it->name(), fieldName, Qt::CaseInsensitive ) == 0 )
{
return it.key();
}
Expand Down

0 comments on commit a0a4cd8

Please sign in to comment.