Use isEmpty() rather than size() to check for empty lists

This commit is contained in:
Nyall Dawson 2016-10-24 10:36:00 +10:00
parent 44289084e9
commit 2fb8695dbe
2 changed files with 2 additions and 2 deletions

View File

@ -456,7 +456,7 @@ void QgsSQLComposerDialog::getFunctionList( const QList<Function>& list,
listApi << f.name;
QString entryText( f.name );
entryText += "(";
if ( f.argumentList.size() )
if ( !f.argumentList.isEmpty() )
{
for ( int i = 0;i < f.argumentList.size();i++ )
{

View File

@ -1162,7 +1162,7 @@ QgsGmlStreamingParser* QgsWFSSharedData::createParser()
axisOrientationLogic = QgsGmlStreamingParser::Ignore_EPSG;
}
if ( mLayerPropertiesList.size() )
if ( !mLayerPropertiesList.isEmpty() )
{
QList< QgsGmlStreamingParser::LayerProperties > layerPropertiesList;
Q_FOREACH ( QgsOgcUtils::LayerProperties layerProperties, mLayerPropertiesList )