We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 15af5a1 commit ecbd691Copy full SHA for ecbd691
tests/src/core/testqgsfields.cpp
@@ -343,6 +343,11 @@ void TestQgsFields::indexFromName()
343
//indexFromName is case sensitive, fieldNameIndex isn't
344
QCOMPARE( fields.indexFromName( QString( "teStFiEld2" ) ), -1 );
345
QCOMPARE( fields.fieldNameIndex( QString( "teStFiEld2" ) ), 1 );
346
+
347
+ //test that fieldNameIndex prefers exact case matches over case insensitive matches
348
+ QgsField sameNameDifferentCase( QString( "teStFielD" ) );
349
+ fields.append( sameNameDifferentCase );
350
+ QCOMPARE( fields.fieldNameIndex( QString( "teStFielD" ) ), 3 );
351
}
352
353
void TestQgsFields::toList()
0 commit comments