From 2fb8695dbed387fd107ddd01d55487395e7c2cd7 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 24 Oct 2016 10:36:00 +1000 Subject: [PATCH] Use isEmpty() rather than size() to check for empty lists --- src/gui/qgssqlcomposerdialog.cpp | 2 +- src/providers/wfs/qgswfsshareddata.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/qgssqlcomposerdialog.cpp b/src/gui/qgssqlcomposerdialog.cpp index e3ad2f24a49..983ee97242d 100644 --- a/src/gui/qgssqlcomposerdialog.cpp +++ b/src/gui/qgssqlcomposerdialog.cpp @@ -456,7 +456,7 @@ void QgsSQLComposerDialog::getFunctionList( const QList& 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++ ) { diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp index ea59e0bca6b..da54b696b64 100644 --- a/src/providers/wfs/qgswfsshareddata.cpp +++ b/src/providers/wfs/qgswfsshareddata.cpp @@ -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 )