-rw-r--r-- | library/qcom.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qcom.h b/library/qcom.h index 5703800..be94013 100644 --- a/library/qcom.h +++ b/library/qcom.h | |||
@@ -123,50 +123,50 @@ public: | |||
123 | 123 | ||
124 | QUnknownInterface** operator &() const { | 124 | QUnknownInterface** operator &() const { |
125 | if( iface ) | 125 | if( iface ) |
126 | iface->release(); | 126 | iface->release(); |
127 | return (QUnknownInterface**)&iface; | 127 | return (QUnknownInterface**)&iface; |
128 | } | 128 | } |
129 | 129 | ||
130 | T** operator &() { | 130 | T** operator &() { |
131 | if ( iface ) | 131 | if ( iface ) |
132 | iface->release(); | 132 | iface->release(); |
133 | return &iface; | 133 | return &iface; |
134 | } | 134 | } |
135 | 135 | ||
136 | private: | 136 | private: |
137 | T* iface; | 137 | T* iface; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | 140 | ||
141 | // internal class that wraps an initialized ulong | 141 | // internal class that wraps an initialized ulong |
142 | struct Q_EXPORT QtULong | 142 | struct Q_EXPORT QtULong |
143 | { | 143 | { |
144 | QtULong() : ref( 0 ) { } | 144 | QtULong() : ref( 0 ) { } |
145 | operator unsigned long () const { return ref; } | 145 | operator unsigned long () const { return ref; } |
146 | unsigned long& operator++() { return ++ref; } | 146 | unsigned long& operator++() { return ++ref; } |
147 | unsigned long operator++( int ) { return ref++; } | 147 | unsigned long operator++( int ) { return ref++; } |
148 | unsigned long& operator--() { return --ref; } | 148 | unsigned long& operator--() { return --ref; } |
149 | unsigned long operator--( int ) { return ref--; } | 149 | unsigned long operator--( int ) { return ref--; } |
150 | 150 | ||
151 | unsigned long ref; | 151 | unsigned long ref; |
152 | }; | 152 | }; |
153 | 153 | ||
154 | #define Q_EXPORT_INTERFACE() \ | 154 | #define Q_EXPORT_INTERFACE() \ |
155 | extern "C" QUnknownInterface* ucm_instantiate QPE_EXPORT_SYMBOL () | 155 | extern "C" QPE_EXPORT_SYMBOL QUnknownInterface* ucm_instantiate () |
156 | 156 | ||
157 | #define Q_REFCOUNT \ | 157 | #define Q_REFCOUNT \ |
158 | private: \ | 158 | private: \ |
159 | QtULong qtrefcount; \ | 159 | QtULong qtrefcount; \ |
160 | public: \ | 160 | public: \ |
161 | ulong addRef() {return qtrefcount++;} \ | 161 | ulong addRef() {return qtrefcount++;} \ |
162 | ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;} | 162 | ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;} |
163 | 163 | ||
164 | #else // QT_NO_COMPONENT | 164 | #else // QT_NO_COMPONENT |
165 | 165 | ||
166 | struct Q_EXPORT QUnknownInterface | 166 | struct Q_EXPORT QUnknownInterface |
167 | { | 167 | { |
168 | }; | 168 | }; |
169 | 169 | ||
170 | #endif // QT_NO_COMPONENT | 170 | #endif // QT_NO_COMPONENT |
171 | 171 | ||
172 | #endif // QCOM_H | 172 | #endif // QCOM_H |