113 int propertyCount, propertyData; |
113 int propertyCount, propertyData; |
114 int enumeratorCount, enumeratorData; |
114 int enumeratorCount, enumeratorData; |
115 int constructorCount, constructorData; //since revision 2 |
115 int constructorCount, constructorData; //since revision 2 |
116 int flags; //since revision 3 |
116 int flags; //since revision 3 |
117 int signalCount; //since revision 4 |
117 int signalCount; //since revision 4 |
|
118 // revision 5 introduces changes in normalized signatures, no new members |
118 |
119 |
119 static inline const QMetaObjectPrivate *get(const QMetaObject *metaobject) |
120 static inline const QMetaObjectPrivate *get(const QMetaObject *metaobject) |
120 { return reinterpret_cast<const QMetaObjectPrivate*>(metaobject->d.data); } |
121 { return reinterpret_cast<const QMetaObjectPrivate*>(metaobject->d.data); } |
121 |
122 |
122 static int indexOfSignalRelative(const QMetaObject **baseObject, const char* name); |
123 static int indexOfSignalRelative(const QMetaObject **baseObject, |
|
124 const char* name, |
|
125 bool normalizeStringData); |
|
126 static int indexOfSlot(const QMetaObject *m, |
|
127 const char *slot, |
|
128 bool normalizeStringData); |
123 static int originalClone(const QMetaObject *obj, int local_method_index); |
129 static int originalClone(const QMetaObject *obj, int local_method_index); |
124 |
130 |
125 #ifndef QT_NO_QOBJECT |
131 #ifndef QT_NO_QOBJECT |
126 //defined in qobject.cpp |
132 //defined in qobject.cpp |
127 enum DisconnectType { DisconnectAll, DisconnectOne }; |
133 enum DisconnectType { DisconnectAll, DisconnectOne }; |
245 break; |
251 break; |
246 } |
252 } |
247 } while (optional[++i].keyword != 0); |
253 } while (optional[++i].keyword != 0); |
248 } |
254 } |
249 |
255 |
|
256 bool star = false; |
250 while (t != e) { |
257 while (t != e) { |
251 char c = *t++; |
258 char c = *t++; |
252 if (fixScope && c == ':' && *t == ':' ) { |
259 if (fixScope && c == ':' && *t == ':' ) { |
253 ++t; |
260 ++t; |
254 c = *t++; |
261 c = *t++; |
255 int i = result.size() - 1; |
262 int i = result.size() - 1; |
256 while (i >= 0 && is_ident_char(result.at(i))) |
263 while (i >= 0 && is_ident_char(result.at(i))) |
257 --i; |
264 --i; |
258 result.resize(i + 1); |
265 result.resize(i + 1); |
259 } |
266 } |
|
267 star = star || c == '*'; |
260 result += c; |
268 result += c; |
261 if (c == '<') { |
269 if (c == '<') { |
262 //template recursion |
270 //template recursion |
263 const char* tt = t; |
271 const char* tt = t; |
264 int templdepth = 1; |
272 int templdepth = 1; |
275 result += ' '; // avoid >> |
283 result += ' '; // avoid >> |
276 break; |
284 break; |
277 } |
285 } |
278 } |
286 } |
279 } |
287 } |
|
288 |
|
289 // cv qualifers can appear after the type as well |
|
290 if (!is_ident_char(c) && t != e && (e - t >= 5 && strncmp("const", t, 5) == 0) |
|
291 && (e - t == 5 || !is_ident_char(t[5]))) { |
|
292 t += 5; |
|
293 while (t != e && is_space(*t)) |
|
294 ++t; |
|
295 if (adjustConst && t != e && *t == '&') { |
|
296 // treat const ref as value |
|
297 ++t; |
|
298 } else if (adjustConst && !star) { |
|
299 // treat const as value |
|
300 } else if (!star) { |
|
301 // move const to the front (but not if const comes after a *) |
|
302 result.prepend("const "); |
|
303 } else { |
|
304 // keep const after a * |
|
305 result += "const"; |
|
306 } |
|
307 } |
280 } |
308 } |
281 |
309 |
282 return result; |
310 return result; |
283 } |
311 } |
284 |
312 |