diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /juk/sortedstringlist.cpp | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/sortedstringlist.cpp')
-rw-r--r-- | juk/sortedstringlist.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/juk/sortedstringlist.cpp b/juk/sortedstringlist.cpp index 0886a88d..904c5f01 100644 --- a/juk/sortedstringlist.cpp +++ b/juk/sortedstringlist.cpp @@ -20,11 +20,11 @@ class SortedStringList::Node { public: - Node(const TQString &value) : key(value), parent(0), left(0), right(0) {} + Node(const TQString &value) : key(value), tqparent(0), left(0), right(0) {} ~Node() {} TQString key; - Node *parent; + Node *tqparent; Node *left; Node *right; }; @@ -44,9 +44,9 @@ bool SortedStringList::insert(const TQString &value) return BSTInsert(value); } -bool SortedStringList::contains(const TQString &value) const +bool SortedStringList::tqcontains(const TQString &value) const { - return find(value); + return tqfind(value); } SortedStringList::Node *SortedStringList::treeMinimum(Node *n) const @@ -61,11 +61,11 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const if(n->right) return treeMinimum(n->right); - Node *p = n->parent; + Node *p = n->tqparent; while(p && n == p->right) { n = p; - p = p->parent; + p = p->tqparent; } return p; @@ -73,7 +73,7 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const bool SortedStringList::remove(const TQString &value) { - Node *n = find(value); + Node *n = tqfind(value); if(!n) return false; @@ -92,15 +92,15 @@ bool SortedStringList::remove(const TQString &value) x = y->right; if(x) - x->parent = y->parent; + x->tqparent = y->tqparent; - if(!y->parent) + if(!y->tqparent) m_root = x; else { - if(y == y->parent->left) - y->parent->left = x; + if(y == y->tqparent->left) + y->tqparent->left = x; else - y->parent->right = x; + y->tqparent->right = x; } if(y != x) @@ -122,7 +122,7 @@ TQStringList SortedStringList::values() const // private methods //////////////////////////////////////////////////////////////////////////////// -SortedStringList::Node *SortedStringList::find(const TQString &value) const +SortedStringList::Node *SortedStringList::tqfind(const TQString &value) const { Node *n = m_root; while(n && value != n->key) { @@ -155,7 +155,7 @@ bool SortedStringList::BSTInsert(const TQString &value) Node *n = new Node(value); - n->parent = previousNode; + n->tqparent = previousNode; if(!m_root) m_root = n; |