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