Differential D24817 Diff 68400 src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp
Changeset View
Changeset View
Standalone View
Standalone View
src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp
- This file was added.
1 | #include <QtScript/QScriptEngine> | ||||
---|---|---|---|---|---|
2 | #include <QtScript/QScriptContext> | ||||
3 | #include <QtScript/QScriptValue> | ||||
4 | #include <QtCore/QStringList> | ||||
5 | #include <QtCore/QDebug> | ||||
6 | #include <qmetaobject.h> | ||||
7 | #include <__package_shared.h> | ||||
8 | | ||||
9 | #include <qxmlstream.h> | ||||
10 | #include <QVariant> | ||||
11 | #include <qlist.h> | ||||
12 | #include <qvector.h> | ||||
13 | #include <qxmlstream.h> | ||||
14 | | ||||
15 | static const char * const qtscript_QXmlStreamAttributes_function_names[] = { | ||||
16 | "QXmlStreamAttributes" | ||||
17 | // static | ||||
18 | , "fromList" | ||||
19 | // prototype | ||||
20 | , "append" | ||||
21 | , "at" | ||||
22 | , "capacity" | ||||
23 | , "clear" | ||||
24 | , "contains" | ||||
25 | , "count" | ||||
26 | , "empty" | ||||
27 | , "endsWith" | ||||
28 | , "fill" | ||||
29 | , "first" | ||||
30 | , "hasAttribute" | ||||
31 | , "indexOf" | ||||
32 | , "isEmpty" | ||||
33 | , "isSharedWith" | ||||
34 | , "last" | ||||
35 | , "lastIndexOf" | ||||
36 | , "length" | ||||
37 | , "mid" | ||||
38 | , "equals" | ||||
39 | , "prepend" | ||||
40 | , "remove" | ||||
41 | , "removeAt" | ||||
42 | , "removeFirst" | ||||
43 | , "removeLast" | ||||
44 | , "replace" | ||||
45 | , "reserve" | ||||
46 | , "resize" | ||||
47 | , "setSharable" | ||||
48 | , "size" | ||||
49 | , "squeeze" | ||||
50 | , "startsWith" | ||||
51 | , "swap" | ||||
52 | , "takeAt" | ||||
53 | , "takeFirst" | ||||
54 | , "takeLast" | ||||
55 | , "toList" | ||||
56 | , "value" | ||||
57 | , "toString" | ||||
58 | }; | ||||
59 | | ||||
60 | static const char * const qtscript_QXmlStreamAttributes_function_signatures[] = { | ||||
61 | "" | ||||
62 | // static | ||||
63 | , "List list" | ||||
64 | // prototype | ||||
65 | , "String namespaceUri, String name, String value\nString qualifiedName, String value\nQXmlStreamAttribute attribute" | ||||
66 | , "int i" | ||||
67 | , "" | ||||
68 | , "" | ||||
69 | , "QXmlStreamAttribute t" | ||||
70 | , "\nQXmlStreamAttribute t" | ||||
71 | , "" | ||||
72 | , "QXmlStreamAttribute t" | ||||
73 | , "QXmlStreamAttribute t, int size" | ||||
74 | , "" | ||||
75 | , "String namespaceUri, String name\nString qualifiedName" | ||||
76 | , "QXmlStreamAttribute t, int from" | ||||
77 | , "" | ||||
78 | , "List other" | ||||
79 | , "" | ||||
80 | , "QXmlStreamAttribute t, int from" | ||||
81 | , "" | ||||
82 | , "int pos, int len" | ||||
83 | , "List v" | ||||
84 | , "QXmlStreamAttribute t" | ||||
85 | , "int i\nint i, int n" | ||||
86 | , "int i" | ||||
87 | , "" | ||||
88 | , "" | ||||
89 | , "int i, QXmlStreamAttribute t" | ||||
90 | , "int size" | ||||
91 | , "int size" | ||||
92 | , "bool sharable" | ||||
93 | , "" | ||||
94 | , "" | ||||
95 | , "QXmlStreamAttribute t" | ||||
96 | , "List other" | ||||
97 | , "int i" | ||||
98 | , "" | ||||
99 | , "" | ||||
100 | , "" | ||||
101 | , "String namespaceUri, String name\nString qualifiedName" | ||||
102 | "" | ||||
103 | }; | ||||
104 | | ||||
105 | static const int qtscript_QXmlStreamAttributes_function_lengths[] = { | ||||
106 | 0 | ||||
107 | // static | ||||
108 | , 1 | ||||
109 | // prototype | ||||
110 | , 3 | ||||
111 | , 1 | ||||
112 | , 0 | ||||
113 | , 0 | ||||
114 | , 1 | ||||
115 | , 1 | ||||
116 | , 0 | ||||
117 | , 1 | ||||
118 | , 2 | ||||
119 | , 0 | ||||
120 | , 2 | ||||
121 | , 2 | ||||
122 | , 0 | ||||
123 | , 1 | ||||
124 | , 0 | ||||
125 | , 2 | ||||
126 | , 0 | ||||
127 | , 2 | ||||
128 | , 1 | ||||
129 | , 1 | ||||
130 | , 2 | ||||
131 | , 1 | ||||
132 | , 0 | ||||
133 | , 0 | ||||
134 | , 2 | ||||
135 | , 1 | ||||
136 | , 1 | ||||
137 | , 1 | ||||
138 | , 0 | ||||
139 | , 0 | ||||
140 | , 1 | ||||
141 | , 1 | ||||
142 | , 1 | ||||
143 | , 0 | ||||
144 | , 0 | ||||
145 | , 0 | ||||
146 | , 2 | ||||
147 | , 0 | ||||
148 | }; | ||||
149 | | ||||
150 | static QScriptValue qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper( | ||||
151 | QScriptContext *context, const char *functionName, const char *signatures) | ||||
152 | { | ||||
153 | QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); | ||||
154 | QStringList fullSignatures; | ||||
155 | for (int i = 0; i < lines.size(); ++i) | ||||
156 | fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); | ||||
157 | return context->throwError(QString::fromLatin1("QXmlStreamAttributes::%0(): could not find a function match; candidates are:\n%1") | ||||
158 | .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); | ||||
159 | } | ||||
160 | | ||||
161 | Q_DECLARE_METATYPE(QXmlStreamAttributes) | ||||
162 | Q_DECLARE_METATYPE(QXmlStreamAttributes*) | ||||
163 | Q_DECLARE_METATYPE(QXmlStreamAttribute) | ||||
164 | Q_DECLARE_METATYPE(QVector<QXmlStreamAttribute >) | ||||
165 | Q_DECLARE_METATYPE(QList<QXmlStreamAttribute >) | ||||
166 | Q_DECLARE_METATYPE(QStringRef) | ||||
167 | | ||||
168 | // | ||||
169 | // QXmlStreamAttributes | ||||
170 | // | ||||
171 | | ||||
172 | static QScriptValue qtscript_QXmlStreamAttributes_prototype_call(QScriptContext *context, QScriptEngine *) | ||||
173 | { | ||||
174 | #if QT_VERSION > 0x040400 | ||||
175 | Q_ASSERT(context->callee().isFunction()); | ||||
176 | uint _id = context->callee().data().toUInt32(); | ||||
177 | #else | ||||
178 | uint _id; | ||||
179 | if (context->callee().isFunction()) | ||||
180 | _id = context->callee().data().toUInt32(); | ||||
181 | else | ||||
182 | _id = 0xBABE0000 + 37; | ||||
183 | #endif | ||||
184 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
185 | _id &= 0x0000FFFF; | ||||
186 | QXmlStreamAttributes* _q_self = qscriptvalue_cast<QXmlStreamAttributes*>(context->thisObject()); | ||||
187 | if (!_q_self) { | ||||
188 | return context->throwError(QScriptContext::TypeError, | ||||
189 | QString::fromLatin1("QXmlStreamAttributes.%0(): this object is not a QXmlStreamAttributes") | ||||
190 | .arg(qtscript_QXmlStreamAttributes_function_names[_id+2])); | ||||
191 | } | ||||
192 | | ||||
193 | switch (_id) { | ||||
194 | case 0: | ||||
195 | if (context->argumentCount() == 1) { | ||||
196 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
197 | _q_self->append(_q_arg0); | ||||
198 | return context->engine()->undefinedValue(); | ||||
199 | } | ||||
200 | if (context->argumentCount() == 2) { | ||||
201 | QString _q_arg0 = context->argument(0).toString(); | ||||
202 | QString _q_arg1 = context->argument(1).toString(); | ||||
203 | _q_self->append(_q_arg0, _q_arg1); | ||||
204 | return context->engine()->undefinedValue(); | ||||
205 | } | ||||
206 | if (context->argumentCount() == 3) { | ||||
207 | QString _q_arg0 = context->argument(0).toString(); | ||||
208 | QString _q_arg1 = context->argument(1).toString(); | ||||
209 | QString _q_arg2 = context->argument(2).toString(); | ||||
210 | _q_self->append(_q_arg0, _q_arg1, _q_arg2); | ||||
211 | return context->engine()->undefinedValue(); | ||||
212 | } | ||||
213 | break; | ||||
214 | | ||||
215 | case 1: | ||||
216 | if (context->argumentCount() == 1) { | ||||
217 | int _q_arg0 = context->argument(0).toInt32(); | ||||
218 | const QXmlStreamAttribute& _q_result = _q_self->at(_q_arg0); | ||||
219 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
220 | } | ||||
221 | break; | ||||
222 | | ||||
223 | case 2: | ||||
224 | if (context->argumentCount() == 0) { | ||||
225 | int _q_result = _q_self->capacity(); | ||||
226 | return QScriptValue(context->engine(), _q_result); | ||||
227 | } | ||||
228 | break; | ||||
229 | | ||||
230 | case 3: | ||||
231 | if (context->argumentCount() == 0) { | ||||
232 | _q_self->clear(); | ||||
233 | return context->engine()->undefinedValue(); | ||||
234 | } | ||||
235 | break; | ||||
236 | | ||||
237 | case 4: | ||||
238 | if (context->argumentCount() == 1) { | ||||
239 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
240 | bool _q_result = _q_self->contains(_q_arg0); | ||||
241 | return QScriptValue(context->engine(), _q_result); | ||||
242 | } | ||||
243 | break; | ||||
244 | | ||||
245 | case 5: | ||||
246 | if (context->argumentCount() == 0) { | ||||
247 | int _q_result = _q_self->count(); | ||||
248 | return QScriptValue(context->engine(), _q_result); | ||||
249 | } | ||||
250 | if (context->argumentCount() == 1) { | ||||
251 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
252 | int _q_result = _q_self->count(_q_arg0); | ||||
253 | return QScriptValue(context->engine(), _q_result); | ||||
254 | } | ||||
255 | break; | ||||
256 | | ||||
257 | case 6: | ||||
258 | if (context->argumentCount() == 0) { | ||||
259 | bool _q_result = _q_self->empty(); | ||||
260 | return QScriptValue(context->engine(), _q_result); | ||||
261 | } | ||||
262 | break; | ||||
263 | | ||||
264 | case 7: | ||||
265 | if (context->argumentCount() == 1) { | ||||
266 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
267 | bool _q_result = _q_self->endsWith(_q_arg0); | ||||
268 | return QScriptValue(context->engine(), _q_result); | ||||
269 | } | ||||
270 | break; | ||||
271 | | ||||
272 | case 8: | ||||
273 | if (context->argumentCount() == 1) { | ||||
274 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
275 | QVector<QXmlStreamAttribute >& _q_result = _q_self->fill(_q_arg0); | ||||
276 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
277 | } | ||||
278 | if (context->argumentCount() == 2) { | ||||
279 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
280 | int _q_arg1 = context->argument(1).toInt32(); | ||||
281 | QVector<QXmlStreamAttribute >& _q_result = _q_self->fill(_q_arg0, _q_arg1); | ||||
282 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
283 | } | ||||
284 | break; | ||||
285 | | ||||
286 | case 9: | ||||
287 | if (context->argumentCount() == 0) { | ||||
288 | const QXmlStreamAttribute& _q_result = _q_self->first(); | ||||
289 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
290 | } | ||||
291 | break; | ||||
292 | | ||||
293 | case 10: | ||||
294 | if (context->argumentCount() == 1) { | ||||
295 | QString _q_arg0 = context->argument(0).toString(); | ||||
296 | bool _q_result = _q_self->hasAttribute(_q_arg0); | ||||
297 | return QScriptValue(context->engine(), _q_result); | ||||
298 | } | ||||
299 | if (context->argumentCount() == 2) { | ||||
300 | QString _q_arg0 = context->argument(0).toString(); | ||||
301 | QString _q_arg1 = context->argument(1).toString(); | ||||
302 | bool _q_result = _q_self->hasAttribute(_q_arg0, _q_arg1); | ||||
303 | return QScriptValue(context->engine(), _q_result); | ||||
304 | } | ||||
305 | break; | ||||
306 | | ||||
307 | case 11: | ||||
308 | if (context->argumentCount() == 1) { | ||||
309 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
310 | int _q_result = _q_self->indexOf(_q_arg0); | ||||
311 | return QScriptValue(context->engine(), _q_result); | ||||
312 | } | ||||
313 | if (context->argumentCount() == 2) { | ||||
314 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
315 | int _q_arg1 = context->argument(1).toInt32(); | ||||
316 | int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); | ||||
317 | return QScriptValue(context->engine(), _q_result); | ||||
318 | } | ||||
319 | break; | ||||
320 | | ||||
321 | case 12: | ||||
322 | if (context->argumentCount() == 0) { | ||||
323 | bool _q_result = _q_self->isEmpty(); | ||||
324 | return QScriptValue(context->engine(), _q_result); | ||||
325 | } | ||||
326 | break; | ||||
327 | | ||||
328 | case 13: | ||||
329 | if (context->argumentCount() == 1) { | ||||
330 | QVector<QXmlStreamAttribute> _q_arg0; | ||||
331 | qScriptValueToSequence(context->argument(0), _q_arg0); | ||||
332 | bool _q_result = _q_self->isSharedWith(_q_arg0); | ||||
333 | return QScriptValue(context->engine(), _q_result); | ||||
334 | } | ||||
335 | break; | ||||
336 | | ||||
337 | case 14: | ||||
338 | if (context->argumentCount() == 0) { | ||||
339 | const QXmlStreamAttribute& _q_result = _q_self->last(); | ||||
340 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
341 | } | ||||
342 | break; | ||||
343 | | ||||
344 | case 15: | ||||
345 | if (context->argumentCount() == 1) { | ||||
346 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
347 | int _q_result = _q_self->lastIndexOf(_q_arg0); | ||||
348 | return QScriptValue(context->engine(), _q_result); | ||||
349 | } | ||||
350 | if (context->argumentCount() == 2) { | ||||
351 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
352 | int _q_arg1 = context->argument(1).toInt32(); | ||||
353 | int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); | ||||
354 | return QScriptValue(context->engine(), _q_result); | ||||
355 | } | ||||
356 | break; | ||||
357 | | ||||
358 | case 16: | ||||
359 | if (context->argumentCount() == 0) { | ||||
360 | int _q_result = _q_self->length(); | ||||
361 | return QScriptValue(context->engine(), _q_result); | ||||
362 | } | ||||
363 | break; | ||||
364 | | ||||
365 | case 17: | ||||
366 | if (context->argumentCount() == 1) { | ||||
367 | int _q_arg0 = context->argument(0).toInt32(); | ||||
368 | QVector<QXmlStreamAttribute > _q_result = _q_self->mid(_q_arg0); | ||||
369 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
370 | } | ||||
371 | if (context->argumentCount() == 2) { | ||||
372 | int _q_arg0 = context->argument(0).toInt32(); | ||||
373 | int _q_arg1 = context->argument(1).toInt32(); | ||||
374 | QVector<QXmlStreamAttribute > _q_result = _q_self->mid(_q_arg0, _q_arg1); | ||||
375 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
376 | } | ||||
377 | break; | ||||
378 | | ||||
379 | case 18: | ||||
380 | if (context->argumentCount() == 1) { | ||||
381 | QVector<QXmlStreamAttribute> _q_arg0; | ||||
382 | qScriptValueToSequence(context->argument(0), _q_arg0); | ||||
383 | bool _q_result = _q_self->operator==(_q_arg0); | ||||
384 | return QScriptValue(context->engine(), _q_result); | ||||
385 | } | ||||
386 | break; | ||||
387 | | ||||
388 | case 19: | ||||
389 | if (context->argumentCount() == 1) { | ||||
390 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
391 | _q_self->prepend(_q_arg0); | ||||
392 | return context->engine()->undefinedValue(); | ||||
393 | } | ||||
394 | break; | ||||
395 | | ||||
396 | case 20: | ||||
397 | if (context->argumentCount() == 1) { | ||||
398 | int _q_arg0 = context->argument(0).toInt32(); | ||||
399 | _q_self->remove(_q_arg0); | ||||
400 | return context->engine()->undefinedValue(); | ||||
401 | } | ||||
402 | if (context->argumentCount() == 2) { | ||||
403 | int _q_arg0 = context->argument(0).toInt32(); | ||||
404 | int _q_arg1 = context->argument(1).toInt32(); | ||||
405 | _q_self->remove(_q_arg0, _q_arg1); | ||||
406 | return context->engine()->undefinedValue(); | ||||
407 | } | ||||
408 | break; | ||||
409 | | ||||
410 | case 21: | ||||
411 | if (context->argumentCount() == 1) { | ||||
412 | int _q_arg0 = context->argument(0).toInt32(); | ||||
413 | _q_self->removeAt(_q_arg0); | ||||
414 | return context->engine()->undefinedValue(); | ||||
415 | } | ||||
416 | break; | ||||
417 | | ||||
418 | case 22: | ||||
419 | if (context->argumentCount() == 0) { | ||||
420 | _q_self->removeFirst(); | ||||
421 | return context->engine()->undefinedValue(); | ||||
422 | } | ||||
423 | break; | ||||
424 | | ||||
425 | case 23: | ||||
426 | if (context->argumentCount() == 0) { | ||||
427 | _q_self->removeLast(); | ||||
428 | return context->engine()->undefinedValue(); | ||||
429 | } | ||||
430 | break; | ||||
431 | | ||||
432 | case 24: | ||||
433 | if (context->argumentCount() == 2) { | ||||
434 | int _q_arg0 = context->argument(0).toInt32(); | ||||
435 | QXmlStreamAttribute _q_arg1 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(1)); | ||||
436 | _q_self->replace(_q_arg0, _q_arg1); | ||||
437 | return context->engine()->undefinedValue(); | ||||
438 | } | ||||
439 | break; | ||||
440 | | ||||
441 | case 25: | ||||
442 | if (context->argumentCount() == 1) { | ||||
443 | int _q_arg0 = context->argument(0).toInt32(); | ||||
444 | _q_self->reserve(_q_arg0); | ||||
445 | return context->engine()->undefinedValue(); | ||||
446 | } | ||||
447 | break; | ||||
448 | | ||||
449 | case 26: | ||||
450 | if (context->argumentCount() == 1) { | ||||
451 | int _q_arg0 = context->argument(0).toInt32(); | ||||
452 | _q_self->resize(_q_arg0); | ||||
453 | return context->engine()->undefinedValue(); | ||||
454 | } | ||||
455 | break; | ||||
456 | | ||||
457 | case 27: | ||||
458 | if (context->argumentCount() == 1) { | ||||
459 | bool _q_arg0 = context->argument(0).toBoolean(); | ||||
460 | _q_self->setSharable(_q_arg0); | ||||
461 | return context->engine()->undefinedValue(); | ||||
462 | } | ||||
463 | break; | ||||
464 | | ||||
465 | case 28: | ||||
466 | if (context->argumentCount() == 0) { | ||||
467 | int _q_result = _q_self->size(); | ||||
468 | return QScriptValue(context->engine(), _q_result); | ||||
469 | } | ||||
470 | break; | ||||
471 | | ||||
472 | case 29: | ||||
473 | if (context->argumentCount() == 0) { | ||||
474 | _q_self->squeeze(); | ||||
475 | return context->engine()->undefinedValue(); | ||||
476 | } | ||||
477 | break; | ||||
478 | | ||||
479 | case 30: | ||||
480 | if (context->argumentCount() == 1) { | ||||
481 | QXmlStreamAttribute _q_arg0 = qscriptvalue_cast<QXmlStreamAttribute>(context->argument(0)); | ||||
482 | bool _q_result = _q_self->startsWith(_q_arg0); | ||||
483 | return QScriptValue(context->engine(), _q_result); | ||||
484 | } | ||||
485 | break; | ||||
486 | | ||||
487 | case 31: | ||||
488 | if (context->argumentCount() == 1) { | ||||
489 | QVector<QXmlStreamAttribute> _q_arg0; | ||||
490 | qScriptValueToSequence(context->argument(0), _q_arg0); | ||||
491 | _q_self->swap(_q_arg0); | ||||
492 | return context->engine()->undefinedValue(); | ||||
493 | } | ||||
494 | break; | ||||
495 | | ||||
496 | case 32: | ||||
497 | if (context->argumentCount() == 1) { | ||||
498 | int _q_arg0 = context->argument(0).toInt32(); | ||||
499 | QXmlStreamAttribute _q_result = _q_self->takeAt(_q_arg0); | ||||
500 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
501 | } | ||||
502 | break; | ||||
503 | | ||||
504 | case 33: | ||||
505 | if (context->argumentCount() == 0) { | ||||
506 | QXmlStreamAttribute _q_result = _q_self->takeFirst(); | ||||
507 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
508 | } | ||||
509 | break; | ||||
510 | | ||||
511 | case 34: | ||||
512 | if (context->argumentCount() == 0) { | ||||
513 | QXmlStreamAttribute _q_result = _q_self->takeLast(); | ||||
514 | return qScriptValueFromValue(context->engine(), _q_result); | ||||
515 | } | ||||
516 | break; | ||||
517 | | ||||
518 | case 35: | ||||
519 | if (context->argumentCount() == 0) { | ||||
520 | QList<QXmlStreamAttribute > _q_result = _q_self->toList(); | ||||
521 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
522 | } | ||||
523 | break; | ||||
524 | | ||||
525 | case 36: | ||||
526 | if (context->argumentCount() == 1) { | ||||
527 | QString _q_arg0 = context->argument(0).toString(); | ||||
528 | QStringRef _q_result = _q_self->value(_q_arg0); | ||||
529 | | ||||
530 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
531 | QString _q_convertedResult = _q_result.toString(); | ||||
532 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
533 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
534 | } | ||||
535 | if (context->argumentCount() == 2) { | ||||
536 | QString _q_arg0 = context->argument(0).toString(); | ||||
537 | QString _q_arg1 = context->argument(1).toString(); | ||||
538 | QStringRef _q_result = _q_self->value(_q_arg0, _q_arg1); | ||||
539 | | ||||
540 | // TEMPLATE - core.convert_stringref_to_string - START | ||||
541 | QString _q_convertedResult = _q_result.toString(); | ||||
542 | // TEMPLATE - core.convert_stringref_to_string - END | ||||
543 | return qScriptValueFromValue(context->engine(), _q_convertedResult); | ||||
544 | } | ||||
545 | break; | ||||
546 | | ||||
547 | case 37: { | ||||
548 | QString result = QString::fromLatin1("QXmlStreamAttributes"); | ||||
549 | return QScriptValue(context->engine(), result); | ||||
550 | } | ||||
551 | | ||||
552 | default: | ||||
553 | Q_ASSERT(false); | ||||
554 | } | ||||
555 | return qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper(context, | ||||
556 | qtscript_QXmlStreamAttributes_function_names[_id+2], | ||||
557 | qtscript_QXmlStreamAttributes_function_signatures[_id+2]); | ||||
558 | } | ||||
559 | | ||||
560 | static QScriptValue qtscript_QXmlStreamAttributes_static_call(QScriptContext *context, QScriptEngine *) | ||||
561 | { | ||||
562 | uint _id = context->callee().data().toUInt32(); | ||||
563 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
564 | _id &= 0x0000FFFF; | ||||
565 | switch (_id) { | ||||
566 | case 0: | ||||
567 | if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { | ||||
568 | return context->throwError(QString::fromLatin1("QXmlStreamAttributes(): Did you forget to construct with 'new'?")); | ||||
569 | } | ||||
570 | if (context->argumentCount() == 0) { | ||||
571 | QXmlStreamAttributes _q_cpp_result; | ||||
572 | QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); | ||||
573 | return _q_result; | ||||
574 | } | ||||
575 | break; | ||||
576 | | ||||
577 | case 1: | ||||
578 | if (context->argumentCount() == 1) { | ||||
579 | QList<QXmlStreamAttribute> _q_arg0; | ||||
580 | qScriptValueToSequence(context->argument(0), _q_arg0); | ||||
581 | QVector<QXmlStreamAttribute > _q_result = QXmlStreamAttributes::fromList(_q_arg0); | ||||
582 | return qScriptValueFromSequence(context->engine(), _q_result); | ||||
583 | } | ||||
584 | break; | ||||
585 | | ||||
586 | default: | ||||
587 | Q_ASSERT(false); | ||||
588 | } | ||||
589 | return qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper(context, | ||||
590 | qtscript_QXmlStreamAttributes_function_names[_id], | ||||
591 | qtscript_QXmlStreamAttributes_function_signatures[_id]); | ||||
592 | } | ||||
593 | | ||||
594 | QScriptValue qtscript_create_QXmlStreamAttributes_class(QScriptEngine *engine) | ||||
595 | { | ||||
596 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamAttributes*>(), QScriptValue()); | ||||
597 | QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamAttributes*)0)); | ||||
598 | for (int i = 0; i < 38; ++i) { | ||||
599 | QScriptValue fun = engine->newFunction(qtscript_QXmlStreamAttributes_prototype_call, qtscript_QXmlStreamAttributes_function_lengths[i+2]); | ||||
600 | fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); | ||||
601 | proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamAttributes_function_names[i+2]), | ||||
602 | fun, QScriptValue::SkipInEnumeration); | ||||
603 | } | ||||
604 | | ||||
605 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamAttributes>(), proto); | ||||
606 | engine->setDefaultPrototype(qMetaTypeId<QXmlStreamAttributes*>(), proto); | ||||
607 | | ||||
608 | QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamAttributes_static_call, proto, qtscript_QXmlStreamAttributes_function_lengths[0]); | ||||
609 | ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); | ||||
610 | for (int i = 0; i < 1; ++i) { | ||||
611 | QScriptValue fun = engine->newFunction(qtscript_QXmlStreamAttributes_static_call, | ||||
612 | qtscript_QXmlStreamAttributes_function_lengths[i+1]); | ||||
613 | fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); | ||||
614 | ctor.setProperty(QString::fromLatin1(qtscript_QXmlStreamAttributes_function_names[i+1]), | ||||
615 | fun, QScriptValue::SkipInEnumeration); | ||||
616 | } | ||||
617 | | ||||
618 | return ctor; | ||||
619 | } |