Skip to content

Commit

Permalink
Raise an error when an unary operator is used in combi with a non lit…
Browse files Browse the repository at this point in the history
…eral operand

See #1975 for discussion
  • Loading branch information
rduivenvoorde committed Apr 28, 2015
1 parent ff70892 commit 51c5931
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsogcutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1948,9 +1948,10 @@ QDomElement QgsOgcUtils::expressionUnaryOperatorToOgcFilter( const QgsExpression
uoElem.appendChild( doc.createTextNode( "-" + operandElem.text() ) );
doc.removeChild(operandElem);
}
else // not sure if this will ever happen
else
{
uoElem.appendChild( doc.createTextNode( "-" ) );
errorMessage = QString( "This use of unary operator not implemented yet" );
return QDomElement();
}
break;
case QgsExpression::uoNot:
Expand Down

0 comments on commit 51c5931

Please sign in to comment.