Skip to content
Permalink
Browse files
Revert expression TVL as boolean to int
  • Loading branch information
m-kuhn committed May 19, 2017
1 parent b2cd626 commit 171222b59bdc211e69b663ab96a765fa009bea72
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/core/expression/qgsexpressionutils.h
@@ -62,24 +62,24 @@ class QgsExpressionUtils

static constexpr TVL NOT[3] = { True, False, Unknown };

#define TVL_True QVariant( 1 )
#define TVL_False QVariant( 0 )
#define TVL_Unknown QVariant()

static QVariant tvl2variant( TVL v )
{
switch ( v )
{
case False:
return 0;
return TVL_False;
case True:
return 1;
return TVL_True;
case Unknown:
default:
return QVariant();
return TVL_Unknown;
}
}

#define TVL_True QVariant( true )
#define TVL_False QVariant( false )
#define TVL_Unknown QVariant( QVariant::Int )

// this handles also NULL values
static TVL getTVLValue( const QVariant &value, QgsExpression *parent )
{

0 comments on commit 171222b

Please sign in to comment.