annotate cpp/qt_core/QMetaObject_shell.cpp @ 384:d2f48c4cb3e3

Same behavior of shared libs on linux and windows. Minor build script fixes.
author Max Samukha <maxter@spambox.com>
date Fri, 16 Jul 2010 20:04:29 +0300
parents 9784459f0750
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
251
739d0ee5bd91 Forgot this one
maxter
parents:
diff changeset
1 #include "qtd_core.h"
739d0ee5bd91 Forgot this one
maxter
parents:
diff changeset
2 #include <qobjectdefs.h>
739d0ee5bd91 Forgot this one
maxter
parents:
diff changeset
3
292
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
4
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
5 #include <QList>
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
6
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
7 QTD_EXTERN QTD_EXPORT void* qtd_QMetaObject_superClass(void *nativeId)
251
739d0ee5bd91 Forgot this one
maxter
parents:
diff changeset
8 {
739d0ee5bd91 Forgot this one
maxter
parents:
diff changeset
9 return (void*)((QMetaObject*)nativeId)->superClass();
270
49bfc86ff583 true emit of Qt signals.
eldar
parents: 251
diff changeset
10 }
49bfc86ff583 true emit of Qt signals.
eldar
parents: 251
diff changeset
11
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
12 QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate(QObject *sender, int signal_index, void **argv)
270
49bfc86ff583 true emit of Qt signals.
eldar
parents: 251
diff changeset
13 {
49bfc86ff583 true emit of Qt signals.
eldar
parents: 251
diff changeset
14 QMetaObject::activate(sender, signal_index, argv);
49bfc86ff583 true emit of Qt signals.
eldar
parents: 251
diff changeset
15 }
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
16
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
17 QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate_3(QObject *sender, const QMetaObject *m, int local_signal_index, void **argv)
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
18 {
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
19 QMetaObject::activate(sender, m, local_signal_index, argv);
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
20 }
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
21
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
22 QTD_EXTERN QTD_EXPORT void qtd_QMetaObject_activate_4(QObject *sender, const QMetaObject *m, int from_local_signal_index, int to_local_signal_index, void **argv)
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
23 {
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
24 QMetaObject::activate(sender, m, from_local_signal_index, to_local_signal_index, argv);
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
25 }
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
26
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
27 QTD_EXTERN QTD_EXPORT bool qtd_QMetaObject_connect(const QObject *sender, int signal_index,
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
28 const QObject *receiver, int method_index,
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
29 int type, int *types)
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
30 {
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
31 return QMetaObject::connect(sender, signal_index, receiver, method_index, type, types);
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
32 }
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
33
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
34 QTD_EXTERN QTD_EXPORT int qtd_QMetaObject_indexOfMethod(void *nativeId, const char *method)
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
35 {
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
36 return ((QMetaObject*)nativeId)->indexOfMethod(method);
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
37 }
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
38
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
39 QTD_EXTERN QTD_EXPORT int qtd_QMetaObject_methodCount(void *nativeId)
288
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
40 {
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
41 return ((QMetaObject*)nativeId)->methodCount();
f9559a957be9 new signals and slots implementation
eldar
parents: 270
diff changeset
42 }
292
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
43
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
44 QTD_EXTERN QTD_EXPORT void qtd_create_QList(void *nativeId)
292
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
45 {
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
46 QList<int> & list = (*(QList<int> *)nativeId);
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
47 list.append(54);
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
48 list.append(45);
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
49 }
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
50
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
51 QTD_EXTERN QTD_EXPORT void qtd_create_QList_double(void *nativeId)
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
52 {
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
53 QList<double> & list = (*(QList<double> *)nativeId);
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
54 list.append(54.44);
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
55 list.append(45.55);
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
56 }
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 292
diff changeset
57
384
d2f48c4cb3e3 Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents: 357
diff changeset
58 QTD_EXTERN QTD_EXPORT void qtd_create_QList_QObject(void *nativeId)
292
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
59 {
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
60 QList<QObject*> & list2 = (*(QList<QObject*> *)nativeId);
357
9784459f0750 An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents: 295
diff changeset
61
292
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
62 QList<QObject*> list;
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
63 QObject* a1 = new QObject();
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
64 a1->setObjectName("a1");
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
65 list.append(a1);
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
66 QObject* a2 = new QObject();
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
67 a2->setObjectName("a2");
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
68 list.append(a2);
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
69 list2 = list;
19498f420252 more QList goodness
eldar
parents: 288
diff changeset
70 }