-rw-r--r-- | qmake/include/qptrvector.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake/include/qptrvector.h b/qmake/include/qptrvector.h index f6d9623..49b40b7 100644 --- a/qmake/include/qptrvector.h +++ b/qmake/include/qptrvector.h | |||
@@ -65,49 +65,53 @@ public: | |||
65 | bool isNull() const { return QGVector::size() == 0; } | 65 | bool isNull() const { return QGVector::size() == 0; } |
66 | bool resize( uint size ) { return QGVector::resize(size); } | 66 | bool resize( uint size ) { return QGVector::resize(size); } |
67 | bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); } | 67 | bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); } |
68 | bool remove( uint i ) { return QGVector::remove(i); } | 68 | bool remove( uint i ) { return QGVector::remove(i); } |
69 | type *take( uint i ) { return (type *)QGVector::take(i); } | 69 | type *take( uint i ) { return (type *)QGVector::take(i); } |
70 | void clear() { QGVector::clear(); } | 70 | void clear() { QGVector::clear(); } |
71 | bool fill( const type *d, int size=-1 ) | 71 | bool fill( const type *d, int size=-1 ) |
72 | { return QGVector::fill((Item)d,size);} | 72 | { return QGVector::fill((Item)d,size);} |
73 | void sort() { QGVector::sort(); } | 73 | void sort() { QGVector::sort(); } |
74 | int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); } | 74 | int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); } |
75 | int findRef( const type *d, uint i=0 ) const | 75 | int findRef( const type *d, uint i=0 ) const |
76 | { return QGVector::findRef((Item)d,i);} | 76 | { return QGVector::findRef((Item)d,i);} |
77 | int find( const type *d, uint i= 0 ) const | 77 | int find( const type *d, uint i= 0 ) const |
78 | { return QGVector::find((Item)d,i); } | 78 | { return QGVector::find((Item)d,i); } |
79 | uint containsRef( const type *d ) const | 79 | uint containsRef( const type *d ) const |
80 | { return QGVector::containsRef((Item)d); } | 80 | { return QGVector::containsRef((Item)d); } |
81 | uint contains( const type *d ) const | 81 | uint contains( const type *d ) const |
82 | { return QGVector::contains((Item)d); } | 82 | { return QGVector::contains((Item)d); } |
83 | type *operator[]( int i ) const{ return (type *)QGVector::at(i); } | 83 | type *operator[]( int i ) const{ return (type *)QGVector::at(i); } |
84 | type *at( uint i ) const { return (type *)QGVector::at(i); } | 84 | type *at( uint i ) const { return (type *)QGVector::at(i); } |
85 | void toList( QGList *list ) const{ QGVector::toList(list); } | 85 | void toList( QGList *list ) const{ QGVector::toList(list); } |
86 | 86 | ||
87 | #ifdef Q_QDOC | 87 | #ifdef Q_QDOC |
88 | protected: | 88 | protected: |
89 | virtual int compareItems( QPtrCollection::Item d1, QPtrCollection::Item d2 ); | 89 | virtual int compareItems( QPtrCollection::Item d1, QPtrCollection::Item d2 ); |
90 | virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &d ); | 90 | virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &d ); |
91 | virtual QDataStream& write( QDataStream &s, QPtrCollection::Item d ) const; | 91 | virtual QDataStream& write( QDataStream &s, QPtrCollection::Item d ) const; |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | private: | 94 | private: |
95 | void deleteItem( Item d ); | 95 | void deleteItem( Item d ); |
96 | }; | 96 | }; |
97 | 97 | ||
98 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 98 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
99 | template<> inline void QPtrVector<void>::deleteItem( QPtrCollection::Item ) | 99 | template<> inline void QPtrVector<void>::deleteItem( QPtrCollection::Item ) |
100 | { | 100 | { |
101 | } | 101 | } |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | template<class type> inline void QPtrVector<type>::deleteItem( QPtrCollection::Item d ) | 104 | template<class type> inline void QPtrVector<type>::deleteItem( QPtrCollection::Item d ) |
105 | { | 105 | { |
106 | if ( del_item ) delete (type *)d; | 106 | if ( del_item ) delete (type *)d; |
107 | } | 107 | } |
108 | 108 | ||
109 | #ifndef QT_NO_COMPAT | 109 | #ifndef QT_NO_COMPAT |
110 | #define QVector QPtrVector | 110 | #define QVector QPtrVector |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #ifdef QT_QWINEXPORT | ||
114 | #define Q_DEFINED_QPTRVECTOR | ||
115 | #include "qwinexport.h" | ||
116 | #endif /* QT_QWINEXPORT */ | ||
113 | #endif // QVECTOR_H | 117 | #endif // QVECTOR_H |