[apps] Do not allow store expressions except in Calculation

This commit is contained in:
Léa Saviot
2018-11-16 15:38:25 +01:00
committed by Émilie Feral
parent c01d66c77b
commit 48d281e44d
8 changed files with 10 additions and 20 deletions

View File

@@ -38,18 +38,4 @@ void StorageFunctionApp::willBecomeInactive() {
::App::willBecomeInactive();
}
bool StorageFunctionApp::isAcceptableExpression(const Expression exp, Responder * responder) {
if (TextFieldDelegateApp::isAcceptableExpression(exp, responder)) {
assert(!exp.isUninitialized());
if (exp.type() == ExpressionNode::Type::Store) {
// We do not want to allow a function to be "3->a" or "5->f(x)"
responder->app()->displayWarning(I18n::Message::StoreExpressionNotAcceptedAsFunction);
return false;
}
return true;
}
return false;
}
}