From 60a0e524561ae86c9509c61b00a5d8ba40a1d7ee Mon Sep 17 00:00:00 2001 From: Renaud G Date: Wed, 1 Apr 2015 00:28:17 +0200 Subject: -Better understanding of validators toString method -return error if error have been detected for endless loop. -add listaliasnode.h/.cpp to the pri file -protect the use of pointer --- booleancondition.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'booleancondition.cpp') diff --git a/booleancondition.cpp b/booleancondition.cpp index af4ad10..267d7e9 100644 --- a/booleancondition.cpp +++ b/booleancondition.cpp @@ -77,7 +77,26 @@ void BooleanCondition::setValue(qint64 v) } QString BooleanCondition::toString() { - return QString("BooleanCondition_op_%1_value_%2").arg(m_operator).arg(m_value); + QString str=""; + switch (m_operator) + { + case Equal: + str.append("="); + break; + case GreaterThan: + str.append(">"); + break; + case LesserThan: + str.append("<"); + break; + case GreaterOrEqual: + str.append(">="); + break; + case LesserOrEqual: + str.append("<="); + break; + } + return QString("[%1%2]").arg(str).arg(m_value); } quint8 BooleanCondition::getValidRangeSize(quint64 faces) const { -- cgit v1.2.3-70-g09d2