diff options
Diffstat (limited to 'src/ptrvector.h')
-rw-r--r-- | src/ptrvector.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ptrvector.h b/src/ptrvector.h index 1dd66ea..a27c884 100644 --- a/src/ptrvector.h +++ b/src/ptrvector.h @@ -17,7 +17,7 @@ #include <kdebug.h> #include <ksharedptr.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> namespace Tellico { @@ -134,7 +134,7 @@ public: m_baseVector.insert(&m_baseVector[pos.m_index], t); } - Iterator find(Ptr t) { + Iterator tqfind(Ptr t) { for(size_t i = 0; i < count(); ++i) { if(m_baseVector[i].data() == t) { return Iterator(this, i); @@ -143,16 +143,16 @@ public: return end(); } - bool contains(Ptr t) const { return qFind(m_baseVector.begin(), m_baseVector.end(), Ptr(t)) != m_baseVector.end(); } + bool tqcontains(Ptr t) const { return tqFind(m_baseVector.begin(), m_baseVector.end(), Ptr(t)) != m_baseVector.end(); } bool remove(const Ptr& t) { - Ptr* it = qFind(m_baseVector.begin(), m_baseVector.end(), t); + Ptr* it = tqFind(m_baseVector.begin(), m_baseVector.end(), t); if(it == m_baseVector.end()) return false; m_baseVector.erase(it); return true; } private: - QValueVector<Ptr> m_baseVector; + TQValueVector<Ptr> m_baseVector; }; template <class T> class PtrVector; @@ -259,7 +259,7 @@ public: void push_back(T* ptr) { m_baseVector.push_back(ptr); } bool remove(T* ptr); bool remove(Iterator it); - bool contains(const T* ptr) const; + bool tqcontains(const T* ptr) const; private: #ifndef NDEBUG @@ -268,7 +268,7 @@ private: void check(size_t) const {} #endif - QValueVector<T*> m_baseVector; + TQValueVector<T*> m_baseVector; bool m_autoDelete : 1; }; @@ -287,7 +287,7 @@ bool Tellico::PtrVector<T>::remove(T* t) { if(!t) { return false; } - T** ptr = qFind(m_baseVector.begin(), m_baseVector.end(), t); + T** ptr = tqFind(m_baseVector.begin(), m_baseVector.end(), t); if(ptr == m_baseVector.end()) { return false; } @@ -311,11 +311,11 @@ bool Tellico::PtrVector<T>::remove(Iterator it) { } template <class T> -bool Tellico::PtrVector<T>::contains(const T* t) const { +bool Tellico::PtrVector<T>::tqcontains(const T* t) const { if(!t) { return false; } - const T* const* ptr = qFind(m_baseVector.begin(), m_baseVector.end(), t); + const T* const* ptr = tqFind(m_baseVector.begin(), m_baseVector.end(), t); return ptr != m_baseVector.end(); } |