aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/stringnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/stringnode.cpp')
-rw-r--r--node/stringnode.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/node/stringnode.cpp b/node/stringnode.cpp
index 8f9796d..78b270a 100644
--- a/node/stringnode.cpp
+++ b/node/stringnode.cpp
@@ -1,19 +1,18 @@
#include "stringnode.h"
-StringNode::StringNode()
- : m_stringResult(new StringResult())
+StringNode::StringNode() : m_stringResult(new StringResult())
{
- m_result = m_stringResult;
+ m_result= m_stringResult;
}
-void StringNode::run(ExecutionNode *previous)
+void StringNode::run(ExecutionNode* previous)
{
- m_previousNode = previous;
- if(nullptr!=previous)
+ m_previousNode= previous;
+ if(nullptr != previous)
{
m_result->setPrevious(previous->getResult());
}
- if(nullptr!=m_nextNode)
+ if(nullptr != m_nextNode)
{
m_nextNode->run(this);
}
@@ -21,16 +20,16 @@ void StringNode::run(ExecutionNode *previous)
void StringNode::setString(QString str)
{
- m_data = str;
+ m_data= str;
m_stringResult->setText(m_data);
}
QString StringNode::toString(bool withLabel) const
{
if(withLabel)
{
- QString dataCopy = m_data;
+ QString dataCopy= m_data;
- return QString("%1 [label=\"StringNode %2\"]").arg(m_id, dataCopy.replace('%','\\'));
+ return QString("%1 [label=\"StringNode %2\"]").arg(m_id, dataCopy.replace('%', '\\'));
}
else
{
@@ -39,21 +38,20 @@ QString StringNode::toString(bool withLabel) const
}
qint64 StringNode::getPriority() const
{
- qint64 priority=0;
- if(nullptr!=m_nextNode)
+ qint64 priority= 0;
+ if(nullptr != m_nextNode)
{
- priority = m_nextNode->getPriority();
+ priority= m_nextNode->getPriority();
}
return priority;
}
ExecutionNode* StringNode::getCopy() const
{
- StringNode* node = new StringNode();
+ StringNode* node= new StringNode();
node->setString(m_data);
- if(nullptr!=m_nextNode)
+ if(nullptr != m_nextNode)
{
node->setNextNode(m_nextNode->getCopy());
}
return node;
-
}