Skip to content
Permalink
Browse files

Fix indexOf checks in setDisplayField, make sure they are case insens…

…itive
  • Loading branch information
nyalldawson committed Aug 13, 2013
1 parent 43caf02 commit eb114799d72ee75fb46a56f3a31919f9c2d2abff
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsvectorlayer.cpp
@@ -267,21 +267,21 @@ void QgsVectorLayer::setDisplayField( QString fldName )
// We assume that the user has organized the data with the
// more "interesting" field names first. As such, name should
// be selected before oldname, othername, etc.
if ( fldName.indexOf( "name", false ) > -1 )
if ( fldName.indexOf( "name", 0, Qt::CaseInsensitive ) > -1 )
{
if ( idxName.isEmpty() )
{
idxName = fldName;
}
}
if ( fldName.indexOf( "descrip", false ) > -1 )
if ( fldName.indexOf( "descrip", 0, Qt::CaseInsensitive ) > -1 )
{
if ( idxName.isEmpty() )
{
idxName = fldName;
}
}
if ( fldName.indexOf( "id", false ) > -1 )
if ( fldName.indexOf( "id", 0, Qt::CaseInsensitive ) > -1 )
{
if ( idxId.isEmpty() )
{

0 comments on commit eb11479

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