-rw-r--r-- | libkcal/listbase.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libkcal/listbase.h b/libkcal/listbase.h index 085b13d..6c942ef 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h | |||
@@ -22,5 +22,7 @@ | |||
22 | #define KCAL_LISTBASE_H | 22 | #define KCAL_LISTBASE_H |
23 | 23 | ||
24 | #include <qvaluelist.h> | 24 | #include <q3valuelist.h> |
25 | //Added by qt3to4: | ||
26 | #include <Q3PtrList> | ||
25 | 27 | ||
26 | namespace KCal { | 28 | namespace KCal { |
@@ -32,14 +34,14 @@ namespace KCal { | |||
32 | */ | 34 | */ |
33 | template<class T> | 35 | template<class T> |
34 | class ListBase : public QValueList<T *> | 36 | class ListBase : public Q3ValueList<T *> |
35 | { | 37 | { |
36 | public: | 38 | public: |
37 | ListBase() | 39 | ListBase() |
38 | : QValueList<T *>(), mAutoDelete( false ) | 40 | : Q3ValueList<T *>(), mAutoDelete( false ) |
39 | { | 41 | { |
40 | } | 42 | } |
41 | 43 | ||
42 | ListBase( const ListBase &l ) | 44 | ListBase( const ListBase &l ) |
43 | : QValueList<T *>( l ), mAutoDelete( false ) | 45 | : Q3ValueList<T *>( l ), mAutoDelete( false ) |
44 | { | 46 | { |
45 | } | 47 | } |
@@ -48,6 +50,6 @@ class ListBase : public QValueList<T *> | |||
48 | { | 50 | { |
49 | if ( mAutoDelete ) { | 51 | if ( mAutoDelete ) { |
50 | QValueListIterator<T *> it; | 52 | Q3ValueListIterator<T *> it; |
51 | for( it = QValueList<T*>::begin(); it != QValueList<T*>::end(); ++it ) { | 53 | for( it = Q3ValueList<T*>::begin(); it != Q3ValueList<T*>::end(); ++it ) { |
52 | delete *it; | 54 | delete *it; |
53 | } | 55 | } |
@@ -58,5 +60,5 @@ class ListBase : public QValueList<T *> | |||
58 | { | 60 | { |
59 | if ( this == &l ) return *this; | 61 | if ( this == &l ) return *this; |
60 | QValueList<T *>::operator=( l ); | 62 | Q3ValueList<T *>::operator=( l ); |
61 | return *this; | 63 | return *this; |
62 | } | 64 | } |
@@ -69,6 +71,6 @@ class ListBase : public QValueList<T *> | |||
69 | bool removeRef( T *t ) | 71 | bool removeRef( T *t ) |
70 | { | 72 | { |
71 | QValueListIterator<T *> it = find( t ); | 73 | Q3ValueListIterator<T *> it = find( t ); |
72 | if ( it == QValueList<T*>::end() ) { | 74 | if ( it == Q3ValueList<T*>::end() ) { |
73 | return false; | 75 | return false; |
74 | } else { | 76 | } else { |
@@ -78,6 +80,6 @@ class ListBase : public QValueList<T *> | |||
78 | } | 80 | } |
79 | } | 81 | } |
80 | void fill ( QPtrList<T> list ) { | 82 | void fill ( Q3PtrList<T> list ) { |
81 | QPtrListIterator<T> it (list); | 83 | Q3PtrListIterator<T> it (list); |
82 | T *item; | 84 | T *item; |
83 | while ( (item = it.current()) != 0 ) { | 85 | while ( (item = it.current()) != 0 ) { |