From 831f75a83ca3e5734d3c110af584a0f3bf7430e7 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 20 Aug 2015 12:25:21 +0200 Subject: add bool for toString() in result. --- result/result.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'result/result.cpp') diff --git a/result/result.cpp b/result/result.cpp index 257045c..6451e63 100644 --- a/result/result.cpp +++ b/result/result.cpp @@ -20,9 +20,10 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "result.h" +#include Result::Result() - : m_previous(NULL) + : m_previous(NULL),m_id(QUuid::createUuid().toString()) { } @@ -47,22 +48,22 @@ bool Result::hasResultOfType(RESULT_TYPE type) const } void Result::generateDotTree(QString& s) { - s.append(toString()); + s.append(toString(true)); + s.append(";\n"); + if(NULL!=m_previous) { + s.append(toString(false)); s.append(" -> "); - s.append(m_previous->toString()); - s.append(" [label=\"previousResult\"];\n"); + s.append(m_previous->toString(true)); + s.append("\n"); m_previous->generateDotTree(s); } { s.append(" -> "); - s.append("NULL"); + s.append("NULL;\n"); s.append(" [label=\"previousResult\"];\n"); } } -/*QString Result::toString() -{ - return QString(); -}*/ + -- cgit v1.2.3-70-g09d2