diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-05-19 18:49:02 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-05-19 18:58:56 -0300 |
commit | 7bbe60a475322395eb7522a9b2fbee6682a47818 (patch) | |
tree | 935cf90b8b72655ea5d4ed020456a6adc344f4c9 /cppgenerator.cpp | |
parent | b71a7511d8b76922b738c0f8102a85d27b673b8e (diff) |
Moved creation of MetaObject before injection code on constructor.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r-- | cppgenerator.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 35e6eae6a..8bf84a67d 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -720,6 +720,15 @@ void CppGenerator::writeConstructorWrapper(QTextStream& s, const AbstractMetaFun s << INDENT << "sbkSelf->referredObjects = new Shiboken::RefCountMap;" << endl; s << INDENT << "BindingManager::instance().registerWrapper(sbkSelf, cptr);" << endl; + // Create metaObject and register signal/slot + if (metaClass->isQObject()) { + if (usePySideExtensions()) + s << INDENT << "PySide::signalUpdateSource(self);" << endl; + + s << INDENT << "cptr->metaObject();" << endl; + } + + // Constructor code injections, position=end if (hasCodeInjectionsAtEnd) { // FIXME: C++ arguments are not available in code injection on constructor when position = end. @@ -743,13 +752,6 @@ void CppGenerator::writeConstructorWrapper(QTextStream& s, const AbstractMetaFun } s << endl; - - if (metaClass->isQObject()) { - if (usePySideExtensions()) - s << INDENT << "PySide::signalUpdateSource(self);" << endl; - - s << INDENT << "cptr->metaObject();" << endl; - } s << endl << INDENT << "return 1;" << endl; if (overloadData.maxArgs() > 0) writeErrorSection(s, overloadData); |