~rdale/smoke-gobject/trunk

« back to all changes in this revision

Viewing changes to tests/helloworld/gobject_object.cpp

  • Committer: Richard Dale
  • Date: 2011-07-16 11:10:50 UTC
  • Revision ID: richard.dale@codethink.co.uk-20110716111050-0svb9w8rxvl6az95
* Map unref() function calls onto destructors

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    return Smoke::GObjectProxy::qt_metacall(_c, _id, _a);
23
23
}
24
24
 
 
25
Object::~Object()
 
26
{
 
27
    if (ownership == QtOwnership) {
 
28
        void *_a[] = { 0 };
 
29
        qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a);
 
30
    }
 
31
 
 
32
    ownership = NoOwnership;
 
33
}
 
34
 
25
35
void Object::forceFloating()
26
36
{
27
37
    void *_a[] = { 0 };
124
134
    qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a);
125
135
}
126
136
 
127
 
void Object::unref()
128
 
{
129
 
    void *_a[] = { 0 };
130
 
    qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a);
131
 
}
132
 
 
133
137
void Object::watchClosure(GObject::Closure* _t1)
134
138
{
135
139
    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };