Skip to content
Permalink
Browse files

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
wonder committed Dec 16, 2010
1 parent 8632d73 commit a0a4cd8d42c6718dd9151ac1d303aec6e250f137
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/qgssearchtreenode.cpp
  2. +1 −1 src/core/qgsvectordataprovider.cpp
  3. +1 −1 src/core/qgsvectorlayer.cpp
@@ -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;
}

@@ -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();
}
@@ -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();
}

0 comments on commit a0a4cd8

Please sign in to comment.
You can’t perform that action at this time.