Skip to content

Commit

Permalink
Fix indexOf checks in setDisplayField, make sure they are case insens…
Browse files Browse the repository at this point in the history
…itive
  • Loading branch information
nyalldawson committed Aug 13, 2013
1 parent 43caf02 commit eb11479
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down

0 comments on commit eb11479

Please sign in to comment.