Skip to content
Permalink
Browse files

clean up expression convertion errors

  • Loading branch information
nirvn committed May 29, 2017
1 parent 3419945 commit d996cf28cd00ac9f650b8e99927d0ea73f804993
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/core/expression/qgsexpressionutils.h
@@ -287,7 +287,7 @@ class QgsExpressionUtils
}
// If we get here then we can't convert so we just error and return invalid.
if ( report_error )
parent->setEvalErrorString( QObject::tr( "Cannot convert '%1' to Interval" ).arg( value.toString() ) );
parent->setEvalErrorString( QObject::tr( "Cannot convert '%1' to interval" ).arg( value.toString() ) );

return QgsInterval();
}
@@ -299,7 +299,7 @@ class QgsExpressionUtils

// If we get here then we can't convert so we just error and return invalid.
if ( report_error )
parent->setEvalErrorString( QObject::tr( "Cannot convert '%1' to QgsGradientColorRamp" ).arg( value.toString() ) );
parent->setEvalErrorString( QObject::tr( "Cannot convert '%1' to gradient ramp" ).arg( value.toString() ) );

return QgsGradientColorRamp();
}
@@ -309,7 +309,7 @@ class QgsExpressionUtils
if ( value.canConvert<QgsGeometry>() )
return value.value<QgsGeometry>();

parent->setEvalErrorString( QStringLiteral( "Cannot convert to QgsGeometry" ) );
parent->setEvalErrorString( QStringLiteral( "Cannot convert to geometry" ) );
return QgsGeometry();
}

@@ -318,7 +318,7 @@ class QgsExpressionUtils
if ( value.canConvert<QgsFeature>() )
return value.value<QgsFeature>();

parent->setEvalErrorString( QStringLiteral( "Cannot convert to QgsFeature" ) );
parent->setEvalErrorString( QStringLiteral( "Cannot convert to feature" ) );
return 0;
}

@@ -327,7 +327,7 @@ class QgsExpressionUtils
if ( value.canConvert<QgsExpressionNode *>() )
return value.value<QgsExpressionNode *>();

parent->setEvalErrorString( QStringLiteral( "Cannot convert to Node" ) );
parent->setEvalErrorString( QStringLiteral( "Cannot convert to node" ) );
return nullptr;
}

0 comments on commit d996cf2

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