! * check if expression uses variables * if not, we don't need to check the variable columns (see function values dialog) */
| 111 | * if not, we don't need to check the variable columns (see function values dialog) |
| 112 | */ |
| 113 | bool ExpressionTextEdit::expressionUsesVariables() { |
| 114 | QString text = toPlainText().simplified(); |
| 115 | auto parser = ExpressionParser::getInstance(); |
| 116 | |
| 117 | return !parser->isValid(text); |
| 118 | } |
| 119 | |
| 120 | /*! |
| 121 | * \brief Validates the current expression if the text was changed and highlights the text field if the expression is invalid. |