diff options
| author | 2015-04-01 00:28:17 +0200 | |
|---|---|---|
| committer | 2015-04-01 00:28:17 +0200 | |
| commit | 60a0e524561ae86c9509c61b00a5d8ba40a1d7ee (patch) | |
| tree | cd60b92368403a806ee8e7bcb00b41e5000722f1 /booleancondition.cpp | |
| parent | 5bd5a8a07a900c013c120b4e228c766a84a05b09 (diff) | |
| download | OneRoll-60a0e524561ae86c9509c61b00a5d8ba40a1d7ee.tar.gz OneRoll-60a0e524561ae86c9509c61b00a5d8ba40a1d7ee.zip | |
-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
Diffstat (limited to 'booleancondition.cpp')
| -rw-r--r-- | booleancondition.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
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 { |