Skip to content

Commit eb11479

Browse files
committedAug 13, 2013
Fix indexOf checks in setDisplayField, make sure they are case insensitive
1 parent 43caf02 commit eb11479

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,21 +267,21 @@ void QgsVectorLayer::setDisplayField( QString fldName )
267267
// We assume that the user has organized the data with the
268268
// more "interesting" field names first. As such, name should
269269
// be selected before oldname, othername, etc.
270-
if ( fldName.indexOf( "name", false ) > -1 )
270+
if ( fldName.indexOf( "name", 0, Qt::CaseInsensitive ) > -1 )
271271
{
272272
if ( idxName.isEmpty() )
273273
{
274274
idxName = fldName;
275275
}
276276
}
277-
if ( fldName.indexOf( "descrip", false ) > -1 )
277+
if ( fldName.indexOf( "descrip", 0, Qt::CaseInsensitive ) > -1 )
278278
{
279279
if ( idxName.isEmpty() )
280280
{
281281
idxName = fldName;
282282
}
283283
}
284-
if ( fldName.indexOf( "id", false ) > -1 )
284+
if ( fldName.indexOf( "id", 0, Qt::CaseInsensitive ) > -1 )
285285
{
286286
if ( idxId.isEmpty() )
287287
{

0 commit comments

Comments
 (0)