From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- microbe/traverser.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'microbe/traverser.cpp') diff --git a/microbe/traverser.cpp b/microbe/traverser.cpp index e066381..3436d0c 100644 --- a/microbe/traverser.cpp +++ b/microbe/traverser.cpp @@ -34,8 +34,8 @@ Traverser::~Traverser() BTreeNode * Traverser::start() { /* To find the start we will iterate, or possibly recurse - down the tree, each time turning down the node that has children, - if they both have no children we have reached the end and it shouldn't + down the tree, each time turning down the node that has tqchildren, + if they both have no tqchildren we have reached the end and it shouldn't really matter which we pick (check this algorithm) */ BTreeNode *n = m_root; @@ -54,7 +54,7 @@ BTreeNode * Traverser::start() else n = n->left(); } } - //if(n->parent()) m_current = n->parent(); + //if(n->tqparent()) m_current = n->tqparent(); //else m_current = n; m_current = n; return m_current; @@ -62,22 +62,22 @@ BTreeNode * Traverser::start() BTreeNode * Traverser::next() { - // a.t.m we will just take the next thing to be the parent. - if( m_current != m_root ) m_current = m_current->parent(); + // a.t.m we will just take the next thing to be the tqparent. + if( m_current != m_root ) m_current = m_current->tqparent(); return m_current; } bool Traverser::onLeftBranch() { - return current()->parent()->left() == current(); + return current()->tqparent()->left() == current(); } BTreeNode * Traverser::oppositeNode() { if ( onLeftBranch() ) - return current()->parent()->right(); + return current()->tqparent()->right(); else - return current()->parent()->left(); + return current()->tqparent()->left(); } void Traverser::descendLeftwardToTerminal() @@ -95,6 +95,6 @@ void Traverser::descendLeftwardToTerminal() void Traverser::moveToParent() { - if(current()->parent()) m_current = current()->parent(); + if(current()->tqparent()) m_current = current()->tqparent(); } -- cgit v1.2.3