updated binding sources to the last version
[Leditor.git] / src / lqt_bind_QCoreApplication.cpp
blob998de6328d29348a343327af7f2eb2c031d9fc9d
1 #include "lqt_bind_QCoreApplication.hpp"
3 int LuaBinder< QCoreApplication >::__LuaWrapCall__setApplicationName (lua_State *L) {
4 const QString& arg1 = QString::fromAscii(lua_tostring(L, 1), lua_objlen(L, 1));
5 QCoreApplication::setApplicationName(arg1);
6 return 0;
8 int LuaBinder< QCoreApplication >::__LuaWrapCall__postEvent__OverloadedVersion__1 (lua_State *L) {
9 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
10 QEvent * arg2 = *static_cast<QEvent**>(lqtL_checkudata(L, 2, "QEvent*"));
11 QCoreApplication::postEvent(arg1, arg2);
12 return 0;
14 int LuaBinder< QCoreApplication >::__LuaWrapCall__postEvent__OverloadedVersion__2 (lua_State *L) {
15 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
16 QEvent * arg2 = *static_cast<QEvent**>(lqtL_checkudata(L, 2, "QEvent*"));
17 int arg3 = lua_tointeger(L, 3);
18 QCoreApplication::postEvent(arg1, arg2, arg3);
19 return 0;
21 int LuaBinder< QCoreApplication >::__LuaWrapCall__postEvent (lua_State *L) {
22 int score[3];
23 const int premium = 11+lua_gettop(L);
24 score[1] = 0;
25 if (lqtL_testudata(L, 1, "QObject*")) {
26 score[1] += premium;
27 } else if (false) {
28 score[1] += premium-1; // table: 0x1626390;
29 } else {
30 score[1] -= premium*premium;
32 if (lqtL_testudata(L, 2, "QEvent*")) {
33 score[1] += premium;
34 } else if (false) {
35 score[1] += premium-1; // table: 0x1625d80;
36 } else {
37 score[1] -= premium*premium;
39 score[2] = 0;
40 if (lqtL_testudata(L, 1, "QObject*")) {
41 score[2] += premium;
42 } else if (false) {
43 score[2] += premium-1; // table: 0x1627200;
44 } else {
45 score[2] -= premium*premium;
47 if (lqtL_testudata(L, 2, "QEvent*")) {
48 score[2] += premium;
49 } else if (false) {
50 score[2] += premium-1; // table: 0x1626c60;
51 } else {
52 score[2] -= premium*premium;
54 if (lua_isnumber(L, 3)) {
55 score[2] += premium;
56 } else if (false) {
57 score[2] += premium-1; // table: 0x16276b0;
58 } else {
59 score[2] -= premium*premium;
61 int best = 1;
62 for (int i=1;i<=2;i++) {
63 if (score[best] < score[i]) { best = i; }
65 switch (best) {
66 case 1: return __LuaWrapCall__postEvent__OverloadedVersion__1(L); break;
67 case 2: return __LuaWrapCall__postEvent__OverloadedVersion__2(L); break;
69 lua_pushstring(L, "no overload of function __LuaWrapCall__postEvent matching arguments");
70 lua_error(L);
71 return 0;
73 int LuaBinder< QCoreApplication >::__LuaWrapCall__organizationDomain (lua_State *L) {
74 QString ret = QCoreApplication::organizationDomain();
75 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
76 return 1;
78 int LuaBinder< QCoreApplication >::__LuaWrapCall__addLibraryPath (lua_State *L) {
79 const QString& arg1 = QString::fromAscii(lua_tostring(L, 1), lua_objlen(L, 1));
80 QCoreApplication::addLibraryPath(arg1);
81 return 0;
83 int LuaBinder< QCoreApplication >::__LuaWrapCall__trUtf8__OverloadedVersion__1 (lua_State *L) {
84 const char * arg1 = lua_tostring(L, 1);
85 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
86 QString ret = QCoreApplication::trUtf8(arg1, arg2);
87 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
88 return 1;
90 int LuaBinder< QCoreApplication >::__LuaWrapCall__trUtf8__OverloadedVersion__2 (lua_State *L) {
91 const char * arg1 = lua_tostring(L, 1);
92 const char * arg2 = lua_tostring(L, 2);
93 int arg3 = lua_tointeger(L, 3);
94 QString ret = QCoreApplication::trUtf8(arg1, arg2, arg3);
95 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
96 return 1;
98 int LuaBinder< QCoreApplication >::__LuaWrapCall__trUtf8 (lua_State *L) {
99 int score[3];
100 const int premium = 11+lua_gettop(L);
101 score[1] = 0;
102 if ((lua_type(L, 1)==LUA_TSTRING)) {
103 score[1] += premium;
104 } else if (false) {
105 score[1] += premium-1; // table: 0x1615390;
106 } else {
107 score[1] -= premium*premium;
109 if ((lua_type(L, 2)==LUA_TSTRING)) {
110 score[1] += premium;
111 } else if (true) {
112 score[1] += premium-1; // table: 0x1614ed0;
113 } else {
114 score[1] -= premium*premium;
116 score[2] = 0;
117 if ((lua_type(L, 1)==LUA_TSTRING)) {
118 score[2] += premium;
119 } else if (false) {
120 score[2] += premium-1; // table: 0x1617190;
121 } else {
122 score[2] -= premium*premium;
124 if ((lua_type(L, 2)==LUA_TSTRING)) {
125 score[2] += premium;
126 } else if (false) {
127 score[2] += premium-1; // table: 0x16168a0;
128 } else {
129 score[2] -= premium*premium;
131 if (lua_isnumber(L, 3)) {
132 score[2] += premium;
133 } else if (false) {
134 score[2] += premium-1; // table: 0x1617610;
135 } else {
136 score[2] -= premium*premium;
138 int best = 1;
139 for (int i=1;i<=2;i++) {
140 if (score[best] < score[i]) { best = i; }
142 switch (best) {
143 case 1: return __LuaWrapCall__trUtf8__OverloadedVersion__1(L); break;
144 case 2: return __LuaWrapCall__trUtf8__OverloadedVersion__2(L); break;
146 lua_pushstring(L, "no overload of function __LuaWrapCall__trUtf8 matching arguments");
147 lua_error(L);
148 return 0;
150 int LuaBinder< QCoreApplication >::__LuaWrapCall__setAttribute (lua_State *L) {
151 Qt::ApplicationAttribute arg1 = static_cast<Qt::ApplicationAttribute>(lqtL_toenum(L, 1, "Qt::ApplicationAttribute"));
152 bool arg2 = lua_isboolean(L, 2)?(bool)lua_toboolean(L, 2):true;
153 QCoreApplication::setAttribute(arg1, arg2);
154 return 0;
156 int LuaBinder< QCoreApplication >::__LuaWrapCall__tr__OverloadedVersion__1 (lua_State *L) {
157 const char * arg1 = lua_tostring(L, 1);
158 const char * arg2 = (lua_type(L, 2)==LUA_TSTRING)?lua_tostring(L, 2):static_cast< const char * >(0);
159 QString ret = QCoreApplication::tr(arg1, arg2);
160 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
161 return 1;
163 int LuaBinder< QCoreApplication >::__LuaWrapCall__tr__OverloadedVersion__2 (lua_State *L) {
164 const char * arg1 = lua_tostring(L, 1);
165 const char * arg2 = lua_tostring(L, 2);
166 int arg3 = lua_tointeger(L, 3);
167 QString ret = QCoreApplication::tr(arg1, arg2, arg3);
168 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
169 return 1;
171 int LuaBinder< QCoreApplication >::__LuaWrapCall__tr (lua_State *L) {
172 int score[3];
173 const int premium = 11+lua_gettop(L);
174 score[1] = 0;
175 if ((lua_type(L, 1)==LUA_TSTRING)) {
176 score[1] += premium;
177 } else if (false) {
178 score[1] += premium-1; // table: 0x1614610;
179 } else {
180 score[1] -= premium*premium;
182 if ((lua_type(L, 2)==LUA_TSTRING)) {
183 score[1] += premium;
184 } else if (true) {
185 score[1] += premium-1; // table: 0x1614370;
186 } else {
187 score[1] -= premium*premium;
189 score[2] = 0;
190 if ((lua_type(L, 1)==LUA_TSTRING)) {
191 score[2] += premium;
192 } else if (false) {
193 score[2] += premium-1; // table: 0x1616070;
194 } else {
195 score[2] -= premium*premium;
197 if ((lua_type(L, 2)==LUA_TSTRING)) {
198 score[2] += premium;
199 } else if (false) {
200 score[2] += premium-1; // table: 0x1616550;
201 } else {
202 score[2] -= premium*premium;
204 if (lua_isnumber(L, 3)) {
205 score[2] += premium;
206 } else if (false) {
207 score[2] += premium-1; // table: 0x1616900;
208 } else {
209 score[2] -= premium*premium;
211 int best = 1;
212 for (int i=1;i<=2;i++) {
213 if (score[best] < score[i]) { best = i; }
215 switch (best) {
216 case 1: return __LuaWrapCall__tr__OverloadedVersion__1(L); break;
217 case 2: return __LuaWrapCall__tr__OverloadedVersion__2(L); break;
219 lua_pushstring(L, "no overload of function __LuaWrapCall__tr matching arguments");
220 lua_error(L);
221 return 0;
223 int LuaBinder< QCoreApplication >::__LuaWrapCall__applicationFilePath (lua_State *L) {
224 QString ret = QCoreApplication::applicationFilePath();
225 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
226 return 1;
228 int LuaBinder< QCoreApplication >::__LuaWrapCall__instance (lua_State *L) {
229 QCoreApplication * ret = QCoreApplication::instance();
230 lqtL_pushudata(L, ret, "QCoreApplication*");
231 return 1;
233 int LuaBinder< QCoreApplication >::__LuaWrapCall__argv (lua_State *L) {
234 char * * ret = QCoreApplication::argv();
235 lqtL_pusharguments(L, ret);
236 return 1;
238 int LuaBinder< QCoreApplication >::__LuaWrapCall__setOrganizationName (lua_State *L) {
239 const QString& arg1 = QString::fromAscii(lua_tostring(L, 1), lua_objlen(L, 1));
240 QCoreApplication::setOrganizationName(arg1);
241 return 0;
243 int LuaBinder< QCoreApplication >::__LuaWrapCall__organizationName (lua_State *L) {
244 QString ret = QCoreApplication::organizationName();
245 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
246 return 1;
248 int LuaBinder< QCoreApplication >::__LuaWrapCall__applicationDirPath (lua_State *L) {
249 QString ret = QCoreApplication::applicationDirPath();
250 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
251 return 1;
253 int LuaBinder< QCoreApplication >::__LuaWrapCall__hasPendingEvents (lua_State *L) {
254 bool ret = QCoreApplication::hasPendingEvents();
255 lua_pushboolean(L, ret);
256 return 1;
258 int LuaBinder< QCoreApplication >::__LuaWrapCall__testAttribute (lua_State *L) {
259 Qt::ApplicationAttribute arg1 = static_cast<Qt::ApplicationAttribute>(lqtL_toenum(L, 1, "Qt::ApplicationAttribute"));
260 bool ret = QCoreApplication::testAttribute(arg1);
261 lua_pushboolean(L, ret);
262 return 1;
264 int LuaBinder< QCoreApplication >::__LuaWrapCall__delete (lua_State *L) {
265 QCoreApplication *& __lua__obj = *static_cast<QCoreApplication**>(lqtL_toudata(L, 1, "QCoreApplication"));
266 if (__lua__obj==0) {
267 lua_pushstring(L, "trying to reference deleted pointer");
268 lua_error(L);
269 return 0;
271 delete __lua__obj;
272 __lua__obj = 0;
273 return 0;
275 int LuaBinder< QCoreApplication >::__LuaWrapCall__libraryPaths (lua_State *L) {
276 QStringList ret = QCoreApplication::libraryPaths();
277 lqtL_passudata(L, new QStringList(ret), "QStringList*");
278 return 1;
280 int LuaBinder< QCoreApplication >::__LuaWrapCall__quit (lua_State *L) {
281 QCoreApplication::quit();
282 return 0;
284 int LuaBinder< QCoreApplication >::__LuaWrapCall__removeLibraryPath (lua_State *L) {
285 const QString& arg1 = QString::fromAscii(lua_tostring(L, 1), lua_objlen(L, 1));
286 QCoreApplication::removeLibraryPath(arg1);
287 return 0;
289 int LuaBinder< QCoreApplication >::__LuaWrapCall__argc (lua_State *L) {
290 int ret = QCoreApplication::argc();
291 lua_pushinteger(L, ret);
292 return 1;
294 int LuaBinder< QCoreApplication >::__LuaWrapCall__translate__OverloadedVersion__1 (lua_State *L) {
295 const char * arg1 = lua_tostring(L, 1);
296 const char * arg2 = lua_tostring(L, 2);
297 const char * arg3 = (lua_type(L, 3)==LUA_TSTRING)?lua_tostring(L, 3):static_cast< const char * >(0);
298 QCoreApplication::Encoding arg4 = lqtL_isenum(L, 4, "QCoreApplication::Encoding")?static_cast<QCoreApplication::Encoding>(lqtL_toenum(L, 4, "QCoreApplication::Encoding")):QCoreApplication::CodecForTr;
299 QString ret = QCoreApplication::translate(arg1, arg2, arg3, arg4);
300 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
301 return 1;
303 int LuaBinder< QCoreApplication >::__LuaWrapCall__translate__OverloadedVersion__2 (lua_State *L) {
304 const char * arg1 = lua_tostring(L, 1);
305 const char * arg2 = lua_tostring(L, 2);
306 const char * arg3 = lua_tostring(L, 3);
307 QCoreApplication::Encoding arg4 = static_cast<QCoreApplication::Encoding>(lqtL_toenum(L, 4, "QCoreApplication::Encoding"));
308 int arg5 = lua_tointeger(L, 5);
309 QString ret = QCoreApplication::translate(arg1, arg2, arg3, arg4, arg5);
310 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
311 return 1;
313 int LuaBinder< QCoreApplication >::__LuaWrapCall__translate (lua_State *L) {
314 int score[3];
315 const int premium = 11+lua_gettop(L);
316 score[1] = 0;
317 if ((lua_type(L, 1)==LUA_TSTRING)) {
318 score[1] += premium;
319 } else if (false) {
320 score[1] += premium-1; // table: 0x1632560;
321 } else {
322 score[1] -= premium*premium;
324 if ((lua_type(L, 2)==LUA_TSTRING)) {
325 score[1] += premium;
326 } else if (false) {
327 score[1] += premium-1; // table: 0x1631ff0;
328 } else {
329 score[1] -= premium*premium;
331 if ((lua_type(L, 3)==LUA_TSTRING)) {
332 score[1] += premium;
333 } else if (true) {
334 score[1] += premium-1; // table: 0x1632a10;
335 } else {
336 score[1] -= premium*premium;
338 if (lqtL_isenum(L, 4, "QCoreApplication::Encoding")) {
339 score[1] += premium;
340 } else if (true) {
341 score[1] += premium-1; // table: 0x16332e0;
342 } else {
343 score[1] -= premium*premium;
345 score[2] = 0;
346 if ((lua_type(L, 1)==LUA_TSTRING)) {
347 score[2] += premium;
348 } else if (false) {
349 score[2] += premium-1; // table: 0x1633c80;
350 } else {
351 score[2] -= premium*premium;
353 if ((lua_type(L, 2)==LUA_TSTRING)) {
354 score[2] += premium;
355 } else if (false) {
356 score[2] += premium-1; // table: 0x1634190;
357 } else {
358 score[2] -= premium*premium;
360 if ((lua_type(L, 3)==LUA_TSTRING)) {
361 score[2] += premium;
362 } else if (false) {
363 score[2] += premium-1; // table: 0x1634130;
364 } else {
365 score[2] -= premium*premium;
367 if (lqtL_isenum(L, 4, "QCoreApplication::Encoding")) {
368 score[2] += premium;
369 } else if (false) {
370 score[2] += premium-1; // table: 0x1634980;
371 } else {
372 score[2] -= premium*premium;
374 if (lua_isnumber(L, 5)) {
375 score[2] += premium;
376 } else if (false) {
377 score[2] += premium-1; // table: 0x1634d20;
378 } else {
379 score[2] -= premium*premium;
381 int best = 1;
382 for (int i=1;i<=2;i++) {
383 if (score[best] < score[i]) { best = i; }
385 switch (best) {
386 case 1: return __LuaWrapCall__translate__OverloadedVersion__1(L); break;
387 case 2: return __LuaWrapCall__translate__OverloadedVersion__2(L); break;
389 lua_pushstring(L, "no overload of function __LuaWrapCall__translate matching arguments");
390 lua_error(L);
391 return 0;
393 int LuaBinder< QCoreApplication >::__LuaWrapCall__arguments (lua_State *L) {
394 QStringList ret = QCoreApplication::arguments();
395 lqtL_passudata(L, new QStringList(ret), "QStringList*");
396 return 1;
398 int LuaBinder< QCoreApplication >::__LuaWrapCall__removePostedEvents__OverloadedVersion__1 (lua_State *L) {
399 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
400 QCoreApplication::removePostedEvents(arg1);
401 return 0;
403 int LuaBinder< QCoreApplication >::__LuaWrapCall__removePostedEvents__OverloadedVersion__2 (lua_State *L) {
404 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
405 int arg2 = lua_tointeger(L, 2);
406 QCoreApplication::removePostedEvents(arg1, arg2);
407 return 0;
409 int LuaBinder< QCoreApplication >::__LuaWrapCall__removePostedEvents (lua_State *L) {
410 int score[3];
411 const int premium = 11+lua_gettop(L);
412 score[1] = 0;
413 if (lqtL_testudata(L, 1, "QObject*")) {
414 score[1] += premium;
415 } else if (false) {
416 score[1] += premium-1; // table: 0x1629bc0;
417 } else {
418 score[1] -= premium*premium;
420 score[2] = 0;
421 if (lqtL_testudata(L, 1, "QObject*")) {
422 score[2] += premium;
423 } else if (false) {
424 score[2] += premium-1; // table: 0x162a650;
425 } else {
426 score[2] -= premium*premium;
428 if (lua_isnumber(L, 2)) {
429 score[2] += premium;
430 } else if (false) {
431 score[2] += premium-1; // table: 0x162a0d0;
432 } else {
433 score[2] -= premium*premium;
435 int best = 1;
436 for (int i=1;i<=2;i++) {
437 if (score[best] < score[i]) { best = i; }
439 switch (best) {
440 case 1: return __LuaWrapCall__removePostedEvents__OverloadedVersion__1(L); break;
441 case 2: return __LuaWrapCall__removePostedEvents__OverloadedVersion__2(L); break;
443 lua_pushstring(L, "no overload of function __LuaWrapCall__removePostedEvents matching arguments");
444 lua_error(L);
445 return 0;
447 int LuaBinder< QCoreApplication >::__LuaWrapCall__metaObject (lua_State *L) {
448 QCoreApplication *& __lua__obj = *static_cast<QCoreApplication**>(lqtL_toudata(L, 1, "QCoreApplication"));
449 if (__lua__obj==0) {
450 lua_pushstring(L, "trying to reference deleted pointer");
451 lua_error(L);
452 return 0;
454 const QMetaObject * ret = __lua__obj->QCoreApplication::metaObject();
455 lqtL_pushudata(L, ret, "QMetaObject*");
456 return 1;
458 int LuaBinder< QCoreApplication >::__LuaWrapCall__closingDown (lua_State *L) {
459 bool ret = QCoreApplication::closingDown();
460 lua_pushboolean(L, ret);
461 return 1;
463 int LuaBinder< QCoreApplication >::__LuaWrapCall__sendPostedEvents__OverloadedVersion__1 (lua_State *L) {
464 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
465 int arg2 = lua_tointeger(L, 2);
466 QCoreApplication::sendPostedEvents(arg1, arg2);
467 return 0;
469 int LuaBinder< QCoreApplication >::__LuaWrapCall__sendPostedEvents__OverloadedVersion__2 (lua_State *L) {
470 QCoreApplication::sendPostedEvents();
471 return 0;
473 int LuaBinder< QCoreApplication >::__LuaWrapCall__sendPostedEvents (lua_State *L) {
474 int score[3];
475 const int premium = 11+lua_gettop(L);
476 score[1] = 0;
477 if (lqtL_testudata(L, 1, "QObject*")) {
478 score[1] += premium;
479 } else if (false) {
480 score[1] += premium-1; // table: 0x1628530;
481 } else {
482 score[1] -= premium*premium;
484 if (lua_isnumber(L, 2)) {
485 score[1] += premium;
486 } else if (false) {
487 score[1] += premium-1; // table: 0x1627a70;
488 } else {
489 score[1] -= premium*premium;
491 score[2] = 0;
492 int best = 1;
493 for (int i=1;i<=2;i++) {
494 if (score[best] < score[i]) { best = i; }
496 switch (best) {
497 case 1: return __LuaWrapCall__sendPostedEvents__OverloadedVersion__1(L); break;
498 case 2: return __LuaWrapCall__sendPostedEvents__OverloadedVersion__2(L); break;
500 lua_pushstring(L, "no overload of function __LuaWrapCall__sendPostedEvents matching arguments");
501 lua_error(L);
502 return 0;
504 int LuaBinder< QCoreApplication >::__LuaWrapCall__applicationName (lua_State *L) {
505 QString ret = QCoreApplication::applicationName();
506 lua_pushlstring(L, ret.toAscii().data(), ret.toAscii().size());
507 return 1;
509 int LuaBinder< QCoreApplication >::__LuaWrapCall__startingUp (lua_State *L) {
510 bool ret = QCoreApplication::startingUp();
511 lua_pushboolean(L, ret);
512 return 1;
514 int LuaBinder< QCoreApplication >::__LuaWrapCall__watchUnixSignal (lua_State *L) {
515 int arg1 = lua_tointeger(L, 1);
516 bool arg2 = (bool)lua_toboolean(L, 2);
517 QCoreApplication::watchUnixSignal(arg1, arg2);
518 return 0;
520 int LuaBinder< QCoreApplication >::__LuaWrapCall__flush (lua_State *L) {
521 QCoreApplication::flush();
522 return 0;
524 int LuaBinder< QCoreApplication >::__LuaWrapCall__setOrganizationDomain (lua_State *L) {
525 const QString& arg1 = QString::fromAscii(lua_tostring(L, 1), lua_objlen(L, 1));
526 QCoreApplication::setOrganizationDomain(arg1);
527 return 0;
529 int LuaBinder< QCoreApplication >::__LuaWrapCall__exit (lua_State *L) {
530 int arg1 = lua_isnumber(L, 1)?lua_tointeger(L, 1):static_cast< int >(0);
531 QCoreApplication::exit(arg1);
532 return 0;
534 int LuaBinder< QCoreApplication >::__LuaWrapCall__removeTranslator (lua_State *L) {
535 QTranslator * arg1 = *static_cast<QTranslator**>(lqtL_checkudata(L, 1, "QTranslator*"));
536 QCoreApplication::removeTranslator(arg1);
537 return 0;
539 int LuaBinder< QCoreApplication >::__LuaWrapCall__sendEvent (lua_State *L) {
540 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 1, "QObject*"));
541 QEvent * arg2 = *static_cast<QEvent**>(lqtL_checkudata(L, 2, "QEvent*"));
542 bool ret = QCoreApplication::sendEvent(arg1, arg2);
543 lua_pushboolean(L, ret);
544 return 1;
546 int LuaBinder< QCoreApplication >::__LuaWrapCall__notify (lua_State *L) {
547 QCoreApplication *& __lua__obj = *static_cast<QCoreApplication**>(lqtL_toudata(L, 1, "QCoreApplication"));
548 if (__lua__obj==0) {
549 lua_pushstring(L, "trying to reference deleted pointer");
550 lua_error(L);
551 return 0;
553 QObject * arg1 = *static_cast<QObject**>(lqtL_checkudata(L, 2, "QObject*"));
554 QEvent * arg2 = *static_cast<QEvent**>(lqtL_checkudata(L, 3, "QEvent*"));
555 bool ret = __lua__obj->QCoreApplication::notify(arg1, arg2);
556 lua_pushboolean(L, ret);
557 return 1;
559 int LuaBinder< QCoreApplication >::__LuaWrapCall__setLibraryPaths (lua_State *L) {
560 const QStringList& arg1 = **static_cast<QStringList**>(lqtL_checkudata(L, 1, "QStringList*"));
561 QCoreApplication::setLibraryPaths(arg1);
562 return 0;
564 int LuaBinder< QCoreApplication >::__LuaWrapCall__filterEvent (lua_State *L) {
565 QCoreApplication *& __lua__obj = *static_cast<QCoreApplication**>(lqtL_toudata(L, 1, "QCoreApplication"));
566 if (__lua__obj==0) {
567 lua_pushstring(L, "trying to reference deleted pointer");
568 lua_error(L);
569 return 0;
571 void * arg1 = lua_touserdata(L, 2);
572 long int * arg2 = static_cast<long int *>(lua_touserdata(L, 3));
573 bool ret = __lua__obj->QCoreApplication::filterEvent(arg1, arg2);
574 lua_pushboolean(L, ret);
575 return 1;
577 int LuaBinder< QCoreApplication >::__LuaWrapCall__exec (lua_State *L) {
578 int ret = QCoreApplication::exec();
579 lua_pushinteger(L, ret);
580 return 1;
582 int LuaBinder< QCoreApplication >::__LuaWrapCall__installTranslator (lua_State *L) {
583 QTranslator * arg1 = *static_cast<QTranslator**>(lqtL_checkudata(L, 1, "QTranslator*"));
584 QCoreApplication::installTranslator(arg1);
585 return 0;
587 int LuaBinder< QCoreApplication >::__LuaWrapCall__processEvents__OverloadedVersion__1 (lua_State *L) {
588 QFlags<QEventLoop::ProcessEventsFlag> arg1 = lqtL_testudata(L, 1, "QFlags<QEventLoop::ProcessEventsFlag>*")?**static_cast<QFlags<QEventLoop::ProcessEventsFlag>**>(lqtL_checkudata(L, 1, "QFlags<QEventLoop::ProcessEventsFlag>*")):QEventLoop::AllEvents;
589 QCoreApplication::processEvents(arg1);
590 return 0;
592 int LuaBinder< QCoreApplication >::__LuaWrapCall__processEvents__OverloadedVersion__2 (lua_State *L) {
593 QFlags<QEventLoop::ProcessEventsFlag> arg1 = **static_cast<QFlags<QEventLoop::ProcessEventsFlag>**>(lqtL_checkudata(L, 1, "QFlags<QEventLoop::ProcessEventsFlag>*"));
594 int arg2 = lua_tointeger(L, 2);
595 QCoreApplication::processEvents(arg1, arg2);
596 return 0;
598 int LuaBinder< QCoreApplication >::__LuaWrapCall__processEvents (lua_State *L) {
599 int score[3];
600 const int premium = 11+lua_gettop(L);
601 score[1] = 0;
602 if (lqtL_testudata(L, 1, "QFlags<QEventLoop::ProcessEventsFlag>*")) {
603 score[1] += premium;
604 } else if (true) {
605 score[1] += premium-1; // table: 0x1622ee0;
606 } else {
607 score[1] -= premium*premium;
609 score[2] = 0;
610 if (lqtL_testudata(L, 1, "QFlags<QEventLoop::ProcessEventsFlag>*")) {
611 score[2] += premium;
612 } else if (false) {
613 score[2] += premium-1; // table: 0x1623a40;
614 } else {
615 score[2] -= premium*premium;
617 if (lua_isnumber(L, 2)) {
618 score[2] += premium;
619 } else if (false) {
620 score[2] += premium-1; // table: 0x1623740;
621 } else {
622 score[2] -= premium*premium;
624 int best = 1;
625 for (int i=1;i<=2;i++) {
626 if (score[best] < score[i]) { best = i; }
628 switch (best) {
629 case 1: return __LuaWrapCall__processEvents__OverloadedVersion__1(L); break;
630 case 2: return __LuaWrapCall__processEvents__OverloadedVersion__2(L); break;
632 lua_pushstring(L, "no overload of function __LuaWrapCall__processEvents matching arguments");
633 lua_error(L);
634 return 0;
636 bool LuaBinder< QCoreApplication >::notify (QObject * arg1, QEvent * arg2) {
637 bool absorbed = false;
638 int oldtop = lua_gettop(L);
639 lqtL_pushudata(L, this, "QCoreApplication*");
640 if (lua_getmetatable(L, -1)) {
641 lua_getfield(L, -1, "notify");
642 lua_remove(L, -2);
643 } else {
644 lua_pushnil(L);
646 lua_insert(L, -2);
647 lqtL_pushudata(L, arg1, "QObject*");
648 lqtL_pushudata(L, arg2, "QEvent*");
649 if (lua_isfunction(L, -2-2)) {
650 lua_pcall(L, 2+1, 2, 0);
651 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
652 lua_pop(L, 1);
654 if (!absorbed) {
655 lua_settop(L, oldtop);
656 return this->QCoreApplication::notify(arg1, arg2);
658 bool ret = (bool)lua_toboolean(L, -1);
659 lua_settop(L, oldtop);
660 return ret;
662 bool LuaBinder< QCoreApplication >::eventFilter (QObject * arg1, QEvent * arg2) {
663 bool absorbed = false;
664 int oldtop = lua_gettop(L);
665 lqtL_pushudata(L, this, "QCoreApplication*");
666 if (lua_getmetatable(L, -1)) {
667 lua_getfield(L, -1, "eventFilter");
668 lua_remove(L, -2);
669 } else {
670 lua_pushnil(L);
672 lua_insert(L, -2);
673 lqtL_pushudata(L, arg1, "QObject*");
674 lqtL_pushudata(L, arg2, "QEvent*");
675 if (lua_isfunction(L, -2-2)) {
676 lua_pcall(L, 2+1, 2, 0);
677 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
678 lua_pop(L, 1);
680 if (!absorbed) {
681 lua_settop(L, oldtop);
682 return this->QObject::eventFilter(arg1, arg2);
684 bool ret = (bool)lua_toboolean(L, -1);
685 lua_settop(L, oldtop);
686 return ret;
688 const QMetaObject * LuaBinder< QCoreApplication >::metaObject () const {
689 bool absorbed = false;
690 int oldtop = lua_gettop(L);
691 lqtL_pushudata(L, this, "QCoreApplication*");
692 if (lua_getmetatable(L, -1)) {
693 lua_getfield(L, -1, "metaObject");
694 lua_remove(L, -2);
695 } else {
696 lua_pushnil(L);
698 lua_insert(L, -2);
699 if (lua_isfunction(L, -0-2)) {
700 lua_pcall(L, 0+1, 2, 0);
701 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
702 lua_pop(L, 1);
704 if (!absorbed) {
705 lua_settop(L, oldtop);
706 return this->QCoreApplication::metaObject();
708 const QMetaObject * ret = *static_cast<QMetaObject**>(lqtL_checkudata(L, -1, "QMetaObject*"));
709 lua_settop(L, oldtop);
710 return ret;
712 bool LuaBinder< QCoreApplication >::event (QEvent * arg1) {
713 bool absorbed = false;
714 int oldtop = lua_gettop(L);
715 lqtL_pushudata(L, this, "QCoreApplication*");
716 if (lua_getmetatable(L, -1)) {
717 lua_getfield(L, -1, "event");
718 lua_remove(L, -2);
719 } else {
720 lua_pushnil(L);
722 lua_insert(L, -2);
723 lqtL_pushudata(L, arg1, "QEvent*");
724 if (lua_isfunction(L, -1-2)) {
725 lua_pcall(L, 1+1, 2, 0);
726 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
727 lua_pop(L, 1);
729 if (!absorbed) {
730 lua_settop(L, oldtop);
731 return this->QCoreApplication::event(arg1);
733 bool ret = (bool)lua_toboolean(L, -1);
734 lua_settop(L, oldtop);
735 return ret;
737 void LuaBinder< QCoreApplication >::connectNotify (const char * arg1) {
738 bool absorbed = false;
739 int oldtop = lua_gettop(L);
740 lqtL_pushudata(L, this, "QCoreApplication*");
741 if (lua_getmetatable(L, -1)) {
742 lua_getfield(L, -1, "connectNotify");
743 lua_remove(L, -2);
744 } else {
745 lua_pushnil(L);
747 lua_insert(L, -2);
748 lua_pushstring(L, arg1);
749 if (lua_isfunction(L, -1-2)) {
750 lua_pcall(L, 1+1, 2, 0);
751 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
752 lua_pop(L, 1);
754 if (!absorbed) {
755 lua_settop(L, oldtop);
756 this->QObject::connectNotify(arg1);
758 lua_settop(L, oldtop);
760 void LuaBinder< QCoreApplication >::timerEvent (QTimerEvent * arg1) {
761 bool absorbed = false;
762 int oldtop = lua_gettop(L);
763 lqtL_pushudata(L, this, "QCoreApplication*");
764 if (lua_getmetatable(L, -1)) {
765 lua_getfield(L, -1, "timerEvent");
766 lua_remove(L, -2);
767 } else {
768 lua_pushnil(L);
770 lua_insert(L, -2);
771 lqtL_pushudata(L, arg1, "QTimerEvent*");
772 if (lua_isfunction(L, -1-2)) {
773 lua_pcall(L, 1+1, 2, 0);
774 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
775 lua_pop(L, 1);
777 if (!absorbed) {
778 lua_settop(L, oldtop);
779 this->QObject::timerEvent(arg1);
781 lua_settop(L, oldtop);
783 bool LuaBinder< QCoreApplication >::compressEvent (QEvent * arg1, QObject * arg2, QPostEventList * arg3) {
784 bool absorbed = false;
785 int oldtop = lua_gettop(L);
786 lqtL_pushudata(L, this, "QCoreApplication*");
787 if (lua_getmetatable(L, -1)) {
788 lua_getfield(L, -1, "compressEvent");
789 lua_remove(L, -2);
790 } else {
791 lua_pushnil(L);
793 lua_insert(L, -2);
794 lqtL_pushudata(L, arg1, "QEvent*");
795 lqtL_pushudata(L, arg2, "QObject*");
796 lqtL_pushudata(L, arg3, "QPostEventList*");
797 if (lua_isfunction(L, -3-2)) {
798 lua_pcall(L, 3+1, 2, 0);
799 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
800 lua_pop(L, 1);
802 if (!absorbed) {
803 lua_settop(L, oldtop);
804 return this->QCoreApplication::compressEvent(arg1, arg2, arg3);
806 bool ret = (bool)lua_toboolean(L, -1);
807 lua_settop(L, oldtop);
808 return ret;
810 void LuaBinder< QCoreApplication >::disconnectNotify (const char * arg1) {
811 bool absorbed = false;
812 int oldtop = lua_gettop(L);
813 lqtL_pushudata(L, this, "QCoreApplication*");
814 if (lua_getmetatable(L, -1)) {
815 lua_getfield(L, -1, "disconnectNotify");
816 lua_remove(L, -2);
817 } else {
818 lua_pushnil(L);
820 lua_insert(L, -2);
821 lua_pushstring(L, arg1);
822 if (lua_isfunction(L, -1-2)) {
823 lua_pcall(L, 1+1, 2, 0);
824 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
825 lua_pop(L, 1);
827 if (!absorbed) {
828 lua_settop(L, oldtop);
829 this->QObject::disconnectNotify(arg1);
831 lua_settop(L, oldtop);
833 void LuaBinder< QCoreApplication >::childEvent (QChildEvent * arg1) {
834 bool absorbed = false;
835 int oldtop = lua_gettop(L);
836 lqtL_pushudata(L, this, "QCoreApplication*");
837 if (lua_getmetatable(L, -1)) {
838 lua_getfield(L, -1, "childEvent");
839 lua_remove(L, -2);
840 } else {
841 lua_pushnil(L);
843 lua_insert(L, -2);
844 lqtL_pushudata(L, arg1, "QChildEvent*");
845 if (lua_isfunction(L, -1-2)) {
846 lua_pcall(L, 1+1, 2, 0);
847 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
848 lua_pop(L, 1);
850 if (!absorbed) {
851 lua_settop(L, oldtop);
852 this->QObject::childEvent(arg1);
854 lua_settop(L, oldtop);
856 void LuaBinder< QCoreApplication >::customEvent (QEvent * arg1) {
857 bool absorbed = false;
858 int oldtop = lua_gettop(L);
859 lqtL_pushudata(L, this, "QCoreApplication*");
860 if (lua_getmetatable(L, -1)) {
861 lua_getfield(L, -1, "customEvent");
862 lua_remove(L, -2);
863 } else {
864 lua_pushnil(L);
866 lua_insert(L, -2);
867 lqtL_pushudata(L, arg1, "QEvent*");
868 if (lua_isfunction(L, -1-2)) {
869 lua_pcall(L, 1+1, 2, 0);
870 absorbed = (bool)lua_toboolean(L, -1) || (bool)lua_toboolean(L, -2);
871 lua_pop(L, 1);
873 if (!absorbed) {
874 lua_settop(L, oldtop);
875 this->QObject::customEvent(arg1);
877 lua_settop(L, oldtop);
879 LuaBinder< QCoreApplication >:: ~LuaBinder< QCoreApplication > () {
880 int oldtop = lua_gettop(L);
881 lqtL_pushudata(L, this, "QCoreApplication*");
882 lua_getfield(L, -1, "~QCoreApplication");
884 if (lua_isfunction(L, -1)) {
885 lua_insert(L, -2);
886 lua_pcall(L, 1, 1, 0);
887 } else {
889 lua_settop(L, oldtop);
891 int LuaBinder< QCoreApplication >::lqt_pushenum_Encoding (lua_State *L) {
892 int enum_table = 0;
893 lua_getfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
894 if (!lua_istable(L, -1)) {
895 lua_pop(L, 1);
896 lua_newtable(L);
897 lua_pushvalue(L, -1);
898 lua_setfield(L, LUA_REGISTRYINDEX, LQT_ENUMS);
900 lua_newtable(L);
901 enum_table = lua_gettop(L);
902 lua_pushstring(L, "CodecForTr");
903 lua_rawseti(L, enum_table, 0);
904 lua_pushinteger(L, 0);
905 lua_setfield(L, enum_table, "CodecForTr");
906 lua_pushstring(L, "UnicodeUTF8");
907 lua_rawseti(L, enum_table, 1);
908 lua_pushinteger(L, 1);
909 lua_setfield(L, enum_table, "UnicodeUTF8");
910 lua_pushstring(L, "DefaultCodec");
911 lua_rawseti(L, enum_table, 0);
912 lua_pushinteger(L, 0);
913 lua_setfield(L, enum_table, "DefaultCodec");
914 lua_pushcfunction(L, LuaBinder< QCoreApplication >::lqt_pushenum_Encoding_QFLAGS_CREATOR);
915 lua_setfield(L, enum_table, "QFlags");
916 lua_pushvalue(L, -1);
917 lua_setfield(L, -3, "QCoreApplication::Encoding");
918 lua_remove(L, -2);
919 return 1;
921 int LuaBinder< QCoreApplication >::lqt_pushenum_Encoding_QFLAGS_CREATOR (lua_State *L) {
922 int argn = lua_gettop(L);
923 int i = 0;
924 void *p = lua_newuserdata(L, sizeof(QFlags<QCoreApplication::Encoding>*) + sizeof(QFlags<QCoreApplication::Encoding>));
925 QFlags<QCoreApplication::Encoding> *fl = static_cast<QFlags<QCoreApplication::Encoding>*>( static_cast<void*>(&static_cast<QFlags<QCoreApplication::Encoding>**>(p)[1]) );
926 *(void**)p = fl;
927 for (i=1;i<=argn;i++) {
928 *fl |= static_cast<QCoreApplication::Encoding>(lqtL_toenum(L, i, "QCoreApplication::Encoding"));
930 if (luaL_newmetatable(L, "QFlags<QCoreApplication::Encoding>*")) {
931 lua_pushstring(L, "QFlags<QCoreApplication::Encoding>*");
932 lua_setfield(L, -2, "__qtype");
934 lua_setmetatable(L, -2);
935 return 1;
937 int luaopen_QCoreApplication (lua_State *L) {
938 if (luaL_newmetatable(L, "QCoreApplication*")) {
939 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__setApplicationName);
940 lua_setfield(L, -2, "setApplicationName");
941 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__postEvent);
942 lua_setfield(L, -2, "postEvent");
943 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__organizationDomain);
944 lua_setfield(L, -2, "organizationDomain");
945 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__addLibraryPath);
946 lua_setfield(L, -2, "addLibraryPath");
947 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__trUtf8);
948 lua_setfield(L, -2, "trUtf8");
949 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__setAttribute);
950 lua_setfield(L, -2, "setAttribute");
951 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__tr);
952 lua_setfield(L, -2, "tr");
953 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__applicationFilePath);
954 lua_setfield(L, -2, "applicationFilePath");
955 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__instance);
956 lua_setfield(L, -2, "instance");
957 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__argv);
958 lua_setfield(L, -2, "argv");
959 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__setOrganizationName);
960 lua_setfield(L, -2, "setOrganizationName");
961 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__organizationName);
962 lua_setfield(L, -2, "organizationName");
963 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__applicationDirPath);
964 lua_setfield(L, -2, "applicationDirPath");
965 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__hasPendingEvents);
966 lua_setfield(L, -2, "hasPendingEvents");
967 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__testAttribute);
968 lua_setfield(L, -2, "testAttribute");
969 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__delete);
970 lua_setfield(L, -2, "delete");
971 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__libraryPaths);
972 lua_setfield(L, -2, "libraryPaths");
973 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__quit);
974 lua_setfield(L, -2, "quit");
975 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__removeLibraryPath);
976 lua_setfield(L, -2, "removeLibraryPath");
977 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__argc);
978 lua_setfield(L, -2, "argc");
979 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__translate);
980 lua_setfield(L, -2, "translate");
981 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__arguments);
982 lua_setfield(L, -2, "arguments");
983 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__removePostedEvents);
984 lua_setfield(L, -2, "removePostedEvents");
985 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__metaObject);
986 lua_setfield(L, -2, "metaObject");
987 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__closingDown);
988 lua_setfield(L, -2, "closingDown");
989 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__sendPostedEvents);
990 lua_setfield(L, -2, "sendPostedEvents");
991 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__applicationName);
992 lua_setfield(L, -2, "applicationName");
993 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__startingUp);
994 lua_setfield(L, -2, "startingUp");
995 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__watchUnixSignal);
996 lua_setfield(L, -2, "watchUnixSignal");
997 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__flush);
998 lua_setfield(L, -2, "flush");
999 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__setOrganizationDomain);
1000 lua_setfield(L, -2, "setOrganizationDomain");
1001 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__exit);
1002 lua_setfield(L, -2, "exit");
1003 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__removeTranslator);
1004 lua_setfield(L, -2, "removeTranslator");
1005 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__sendEvent);
1006 lua_setfield(L, -2, "sendEvent");
1007 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__notify);
1008 lua_setfield(L, -2, "notify");
1009 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__setLibraryPaths);
1010 lua_setfield(L, -2, "setLibraryPaths");
1011 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__filterEvent);
1012 lua_setfield(L, -2, "filterEvent");
1013 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__exec);
1014 lua_setfield(L, -2, "exec");
1015 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__installTranslator);
1016 lua_setfield(L, -2, "installTranslator");
1017 lua_pushcfunction(L, LuaBinder< QCoreApplication >::__LuaWrapCall__processEvents);
1018 lua_setfield(L, -2, "processEvents");
1019 LuaBinder< QCoreApplication >::lqt_pushenum_Encoding(L);
1020 lua_setfield(L, -2, "Encoding");
1021 lua_newtable(L);
1022 lua_pushboolean(L, 1);
1023 lua_setfield(L, -2, "QObject*");
1024 lua_setfield(L, -2, "__base");
1025 lua_pushcfunction(L, lqtL_newindex);
1026 lua_setfield(L, -2, "__newindex");
1027 lua_pushcfunction(L, lqtL_index);
1028 lua_setfield(L, -2, "__index");
1029 lua_pushcfunction(L, lqtL_gc);
1030 lua_setfield(L, -2, "__gc");
1031 lua_pushstring(L, "QCoreApplication");
1032 lua_setfield(L, -2, "__qtype");
1033 lua_setglobal(L, "QCoreApplication");
1034 } else {
1035 lua_pop(L, 1);
1037 return 0;