Skip to content

Commit c02630b

Browse files
mhugentnyalldawson
authored andcommittedAug 10, 2018
Use more efficient string functions
1 parent 83da570 commit c02630b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/app/qgsclipboard.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,20 @@ QgsFields QgsClipboard::retrieveFields() const
261261
}
262262

263263
//wkt?
264-
QStringList lines = string.split( "\n" );
265-
if ( lines.size() > 0 )
264+
QStringList lines = string.split( '\n' );
265+
if ( !lines.empty() )
266266
{
267-
QStringList fieldNames = lines.at( 0 ).split( "\t" );
267+
QStringList fieldNames = lines.at( 0 ).split( '\t' );
268268
//wkt / text always has wkt_geom as first attribute (however values can be NULL)
269-
if ( fieldNames.at( 0 ) != "wkt_geom" )
269+
if ( fieldNames.at( 0 ) != QLatin1String( "wkt_geom" ) )
270270
{
271271
return f;
272272
}
273273

274274
for ( int i = 0; i < fieldNames.size(); ++i )
275275
{
276276
QString fieldName = fieldNames.at( i );
277-
if ( fieldName == "wkt_geom" )
277+
if ( fieldName == QLatin1String( "wkt_geom" ) )
278278
{
279279
continue;
280280
}

0 commit comments

Comments
 (0)
Please sign in to comment.