diff --git a/src/core/qgsexpression.cpp b/src/core/qgsexpression.cpp index 3c8685a98e5..282d46c5d77 100644 --- a/src/core/qgsexpression.cpp +++ b/src/core/qgsexpression.cpp @@ -162,13 +162,20 @@ static QVariant tvl2variant( TVL v ) inline bool isIntSafe( const QVariant& v ) { if ( v.type() == QVariant::Int ) return true; + if ( v.type() == QVariant::UInt ) return true; + if ( v.type() == QVariant::LongLong ) return true; + if ( v.type() == QVariant::ULongLong ) return true; if ( v.type() == QVariant::Double ) return false; if ( v.type() == QVariant::String ) { bool ok; v.toString().toInt( &ok ); return ok; } return false; } inline bool isDoubleSafe( const QVariant& v ) { - if ( v.type() == QVariant::Double || v.type() == QVariant::Int ) return true; + if ( v.type() == QVariant::Double ) return true; + if ( v.type() == QVariant::Int ) return true; + if ( v.type() == QVariant::UInt ) return true; + if ( v.type() == QVariant::LongLong ) return true; + if ( v.type() == QVariant::ULongLong ) return true; if ( v.type() == QVariant::String ) { bool ok; v.toString().toDouble( &ok ); return ok; } return false; }