From f2051fb35b1ad49c4d940e6fbba2acc98b216e13 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Tue, 12 Feb 2019 23:59:24 +0100 Subject: clang format --- result/stringresult.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'result/stringresult.cpp') diff --git a/result/stringresult.cpp b/result/stringresult.cpp index 2858155..9685bd8 100644 --- a/result/stringresult.cpp +++ b/result/stringresult.cpp @@ -2,27 +2,23 @@ StringResult::StringResult() { - m_highlight = true; - m_resultTypes = Result::STRING; + m_highlight= true; + m_resultTypes= Result::STRING; } void StringResult::setText(QString text) { - m_value=text; -} -StringResult::~StringResult() -{ - + m_value= text; } +StringResult::~StringResult() {} bool StringResult::hasResultOfType(RESULT_TYPE resultType) const { - if(resultType & Result::STRING) { return true; } else if(resultType & Result::SCALAR) { - bool ok=false; + bool ok= false; getText().toInt(&ok); return ok; } @@ -34,7 +30,6 @@ QString StringResult::getText() const } QVariant StringResult::getResult(RESULT_TYPE type) { - switch(type) { case STRING: @@ -49,18 +44,18 @@ QVariant StringResult::getResult(RESULT_TYPE type) } QString StringResult::toString(bool wl) { - if(wl) - { - return QString("%2 [label=\"StringResult_value_%1\"]").arg(getText().replace("%","_"), m_id); - } - else - { - return m_id; - } + if(wl) + { + return QString("%2 [label=\"StringResult_value_%1\"]").arg(getText().replace("%", "_"), m_id); + } + else + { + return m_id; + } } void StringResult::setHighLight(bool b) { - m_highlight = b; + m_highlight= b; } bool StringResult::hasHighLight() const @@ -69,7 +64,7 @@ bool StringResult::hasHighLight() const } Result* StringResult::getCopy() const { - auto copy = new StringResult(); + auto copy= new StringResult(); copy->setHighLight(m_highlight); copy->setText(m_value); return copy; -- cgit v1.2.3-70-g09d2