-rw-r--r-- | qmake/include/qintdict.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake/include/qintdict.h b/qmake/include/qintdict.h index b4cb223..0299879 100644 --- a/qmake/include/qintdict.h +++ b/qmake/include/qintdict.h | |||
@@ -66,49 +66,53 @@ public: | |||
66 | bool remove( long k ) { return QGDict::remove_int(k); } | 66 | bool remove( long k ) { return QGDict::remove_int(k); } |
67 | type *take( long k ) { return (type*)QGDict::take_int(k); } | 67 | type *take( long k ) { return (type*)QGDict::take_int(k); } |
68 | type *find( long k ) const | 68 | type *find( long k ) const |
69 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } | 69 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } |
70 | type *operator[]( long k ) const | 70 | type *operator[]( long k ) const |
71 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } | 71 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } |
72 | void clear() { QGDict::clear(); } | 72 | void clear() { QGDict::clear(); } |
73 | void resize( uint n ) { QGDict::resize(n); } | 73 | void resize( uint n ) { QGDict::resize(n); } |
74 | void statistics() const { QGDict::statistics(); } | 74 | void statistics() const { QGDict::statistics(); } |
75 | 75 | ||
76 | #ifdef Q_QDOC | 76 | #ifdef Q_QDOC |
77 | protected: | 77 | protected: |
78 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); | 78 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); |
79 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; | 79 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | private: | 82 | private: |
83 | void deleteItem( Item d ); | 83 | void deleteItem( Item d ); |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 86 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
87 | template<> inline void QIntDict<void>::deleteItem( QPtrCollection::Item ) | 87 | template<> inline void QIntDict<void>::deleteItem( QPtrCollection::Item ) |
88 | { | 88 | { |
89 | } | 89 | } |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | template<class type> inline void QIntDict<type>::deleteItem( QPtrCollection::Item d ) | 92 | template<class type> inline void QIntDict<type>::deleteItem( QPtrCollection::Item d ) |
93 | { | 93 | { |
94 | if ( del_item ) delete (type*)d; | 94 | if ( del_item ) delete (type*)d; |
95 | } | 95 | } |
96 | 96 | ||
97 | template<class type> | 97 | template<class type> |
98 | class QIntDictIterator : public QGDictIterator | 98 | class QIntDictIterator : public QGDictIterator |
99 | { | 99 | { |
100 | public: | 100 | public: |
101 | QIntDictIterator(const QIntDict<type> &d) :QGDictIterator((QGDict &)d) {} | 101 | QIntDictIterator(const QIntDict<type> &d) :QGDictIterator((QGDict &)d) {} |
102 | ~QIntDictIterator() {} | 102 | ~QIntDictIterator() {} |
103 | uint count() const { return dict->count(); } | 103 | uint count() const { return dict->count(); } |
104 | bool isEmpty() const { return dict->count() == 0; } | 104 | bool isEmpty() const { return dict->count() == 0; } |
105 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } | 105 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } |
106 | operator type *() const { return (type *)QGDictIterator::get(); } | 106 | operator type *() const { return (type *)QGDictIterator::get(); } |
107 | type *current() const { return (type *)QGDictIterator::get(); } | 107 | type *current() const { return (type *)QGDictIterator::get(); } |
108 | long currentKey() const { return QGDictIterator::getKeyInt(); } | 108 | long currentKey() const { return QGDictIterator::getKeyInt(); } |
109 | type *operator()() { return (type *)QGDictIterator::operator()(); } | 109 | type *operator()() { return (type *)QGDictIterator::operator()(); } |
110 | type *operator++() { return (type *)QGDictIterator::operator++(); } | 110 | type *operator++() { return (type *)QGDictIterator::operator++(); } |
111 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} | 111 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | #ifdef QT_QWINEXPORT | ||
115 | #define Q_DEFINED_QINTDICT | ||
116 | #include "qwinexport.h" | ||
117 | #endif /* QT_QWINEXPORT */ | ||
114 | #endif // QINTDICT_H | 118 | #endif // QINTDICT_H |