don't evaluate the child-nodes when there are none, directly just return ()

This commit is contained in:
dfighter1985 2014-09-17 20:54:16 +02:00
parent 2d4e60a328
commit 274565ff79

View file

@ -297,9 +297,16 @@ QString ExpressionNode::build() const
QStringList l = m_name.split( ' ' ); QStringList l = m_name.split( ' ' );
result = l[ 0 ]; result = l[ 0 ];
result += "( ";
int c = m_links.count(); int c = m_links.count();
if( c == 1 )
{
result += "()";
return result;
}
result += "( ";
for( int i = 1; i < c; i++ ) for( int i = 1; i < c; i++ )
{ {
ExpressionLink *link = m_links[ i ]; ExpressionLink *link = m_links[ i ];