summaryrefslogtreecommitdiff
path: root/qmake/include/qasciidict.h
Unidiff
Diffstat (limited to 'qmake/include/qasciidict.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/qasciidict.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake/include/qasciidict.h b/qmake/include/qasciidict.h
index 8f344cd..ecd9c9f 100644
--- a/qmake/include/qasciidict.h
+++ b/qmake/include/qasciidict.h
@@ -70,49 +70,53 @@ public:
70 type *find( const char *k ) const 70 type *find( const char *k ) const
71 { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } 71 { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); }
72 type *operator[]( const char *k ) const 72 type *operator[]( const char *k ) const
73 { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } 73 { return (type *)((QGDict*)this)->QGDict::look_ascii(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
80protected: 80protected:
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
85private: 85private:
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)
90template<> inline void QAsciiDict<void>::deleteItem( QPtrCollection::Item ) 90template<> inline void QAsciiDict<void>::deleteItem( QPtrCollection::Item )
91{ 91{
92} 92}
93#endif 93#endif
94 94
95template<class type> inline void QAsciiDict<type>::deleteItem( QPtrCollection::Item d ) 95template<class type> inline void QAsciiDict<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
100template<class type> 100template<class type>
101class QAsciiDictIterator : public QGDictIterator 101class QAsciiDictIterator : public QGDictIterator
102{ 102{
103public: 103public:
104 QAsciiDictIterator(const QAsciiDict<type> &d) 104 QAsciiDictIterator(const QAsciiDict<type> &d)
105 : QGDictIterator((QGDict &)d) {} 105 : QGDictIterator((QGDict &)d) {}
106 ~QAsciiDictIterator() {} 106 ~QAsciiDictIterator() {}
107 uint count() const { return dict->count(); } 107 uint count() const { return dict->count(); }
108 bool isEmpty() const { return dict->count() == 0; } 108 bool isEmpty() const { return dict->count() == 0; }
109 type *toFirst() { return (type *)QGDictIterator::toFirst(); } 109 type *toFirst() { return (type *)QGDictIterator::toFirst(); }
110 operator type *() const { return (type *)QGDictIterator::get(); } 110 operator type *() const { return (type *)QGDictIterator::get(); }
111 type *current() const { return (type *)QGDictIterator::get(); } 111 type *current() const { return (type *)QGDictIterator::get(); }
112 const char *currentKey() const { return QGDictIterator::getKeyAscii(); } 112 const char *currentKey() const { return QGDictIterator::getKeyAscii(); }
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_QASCIIDICT
120#include "qwinexport.h"
121#endif /* QT_QWINEXPORT */
118#endif // QASCIIDICT_H 122#endif // QASCIIDICT_H