Skip to content
Permalink
Browse files

Raise an error when an unary operator is used in combi with a non lit…

…eral operand

See #1975 for discussion
  • Loading branch information
rduivenvoorde committed Apr 28, 2015
1 parent ff70892 commit 51c5931baec20fe214834f941e2ba2c52f576821
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsogcutils.cpp
@@ -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:

0 comments on commit 51c5931

Please sign in to comment.
You can’t perform that action at this time.