@@ -329,7 +329,7 @@ static QgsExpression::Interval getInterval( const QVariant& value, QgsExpression
329
329
330
330
return QgsExpression::Interval::invalidInterVal ();
331
331
}
332
- static QgsGeometry getGeometry ( const QVariant& value, QgsExpression* parent)
332
+ static QgsGeometry getGeometry ( const QVariant& value, QgsExpression* parent )
333
333
{
334
334
if ( value.canConvert <QgsGeometry>() )
335
335
return value.value <QgsGeometry>();
@@ -775,7 +775,7 @@ static QVariant fcnGeometry( const QVariantList& , QgsFeature* f, QgsExpression*
775
775
}
776
776
static QVariant fcnGeomFromWKT ( const QVariantList& values, QgsFeature*, QgsExpression* parent )
777
777
{
778
- QString wkt = getStringValue ( values.at ( 0 ), parent );
778
+ QString wkt = getStringValue ( values.at ( 0 ), parent );
779
779
QgsGeometry* geom = QgsGeometry::fromWkt ( wkt );
780
780
if ( geom )
781
781
return QVariant::fromValue ( *geom );
@@ -786,7 +786,7 @@ static QVariant fcnGeomFromGML2( const QVariantList& values, QgsFeature*, QgsExp
786
786
{
787
787
QDomDocument doc;
788
788
QString errorMsg;
789
- QString gml = getStringValue ( values.at ( 0 ), parent );
789
+ QString gml = getStringValue ( values.at ( 0 ), parent );
790
790
if ( !doc.setContent ( gml, true , &errorMsg ) )
791
791
return QVariant ();
792
792
@@ -879,7 +879,7 @@ static QVariant fcnBuffer( const QVariantList& values, QgsFeature*, QgsExpressio
879
879
return QVariant ();
880
880
881
881
QgsGeometry fGeom = getGeometry ( values.at ( 0 ), parent );
882
- double dist = getDoubleValue ( values.at ( 1 ), parent );
882
+ double dist = getDoubleValue ( values.at ( 1 ), parent );
883
883
int seg = 8 ;
884
884
if ( values.length () == 3 )
885
885
seg = getIntValue ( values.at ( 2 ), parent );
@@ -1033,7 +1033,7 @@ const QStringList &QgsExpression::BuiltinFunctions()
1033
1033
{
1034
1034
gmBuiltinFunctions << " sqrt"
1035
1035
<< " sqrt" << " cos" << " sin" << " tan"
1036
- << " asin" << " acos" << " atan" << " atan2"
1036
+ << " asin" << " acos" << " atan" << " atan2"
1037
1037
<< " exp" << " ln" << " log10" << " log"
1038
1038
<< " round" << " toint" << " toreal" << " tostring"
1039
1039
<< " todatetime" << " todate" << " totime" << " tointerval"
@@ -2254,7 +2254,7 @@ void QgsExpression::NodeFunction::toOgcFilter( QDomDocument &doc, QDomElement &e
2254
2254
if ( fd->name () == ogcOperatorName.toLower () )
2255
2255
{
2256
2256
isSpatial = true ;
2257
- QDomElement funcElem = doc.createElement ( " ogc:" + ogcOperatorName );
2257
+ QDomElement funcElem = doc.createElement ( " ogc:" + ogcOperatorName );
2258
2258
QDomElement geomProperty = doc.createElement ( " ogc:PropertyName" );
2259
2259
geomProperty.appendChild ( doc.createTextNode ( " geometry" ) );
2260
2260
funcElem.appendChild ( geomProperty );
@@ -2279,14 +2279,14 @@ void QgsExpression::NodeFunction::toOgcFilter( QDomDocument &doc, QDomElement &e
2279
2279
{
2280
2280
QDomDocument geomDoc;
2281
2281
QString errorMsg;
2282
- QString gml = childElem.firstChildElement ().text ();
2282
+ QString gml = childElem.firstChildElement ().text ();
2283
2283
if ( geomDoc.setContent ( gml, true , &errorMsg ) )
2284
2284
funcElem.appendChild ( doc.documentElement () );
2285
2285
}
2286
2286
}
2287
2287
childElem = childElem.nextSiblingElement ();
2288
2288
}
2289
-
2289
+
2290
2290
element.appendChild ( funcElem );
2291
2291
}
2292
2292
}
@@ -2329,7 +2329,7 @@ QgsExpression::Node* QgsExpression::NodeFunction::createFromOgcFilter( QDomEleme
2329
2329
opeIdx = j;
2330
2330
}
2331
2331
2332
- if (geomIdx == 0 || gml2Idx == 0 || opeIdx == 0 )
2332
+ if ( geomIdx == 0 || gml2Idx == 0 || opeIdx == 0 )
2333
2333
{
2334
2334
errorMessage = QString ( " spatial functions not find %1, got %2, %3, %4" ).arg ( ogcOperatorName ).arg ( geomIdx ).arg ( gml2Idx ).arg ( opeIdx );
2335
2335
return NULL ;
@@ -2338,7 +2338,8 @@ QgsExpression::Node* QgsExpression::NodeFunction::createFromOgcFilter( QDomEleme
2338
2338
QgsExpression::NodeList *gml2Args = new QgsExpression::NodeList ();
2339
2339
QDomElement childElem = element.firstChildElement ();
2340
2340
QString gml2Str = " " ;
2341
- while ( !childElem.isNull () && gml2Str == " " ) {
2341
+ while ( !childElem.isNull () && gml2Str == " " )
2342
+ {
2342
2343
if ( childElem.tagName () != " PropertyName" )
2343
2344
{
2344
2345
QTextStream gml2Stream ( &gml2Str );
0 commit comments