summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-05-12 17:18:02 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-05-13 11:26:39 -0300
commitfc7800974e6a9830ebb4fc583763b038a63ae231 (patch)
treeed89d5bce2157f48779595b9ae546a6f705e6162
parent2351a7009b83beadb12c75210278684a5b08b362 (diff)
downloadshiboken-fc7800974e6a9830ebb4fc583763b038a63ae231.tar.gz
shiboken-fc7800974e6a9830ebb4fc583763b038a63ae231.tar.xz
shiboken-fc7800974e6a9830ebb4fc583763b038a63ae231.zip
Replaced current generated code to DynamicQMetaObject to new way, to
allow collect PyType info. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--cppgenerator.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 777c9659..d02af3db 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -596,9 +596,7 @@ void CppGenerator::writeMetaObjectMethod(QTextStream& s, const AbstractMetaClass
<< INDENT << "if (!typeData) {" << endl;
{
Indentation indentation2(INDENT);
- s << INDENT << "QString className(pySelf->ob_type->tp_name);" << endl
- << INDENT << "className = className.mid(className.lastIndexOf(\".\")+1);" << endl
- << INDENT << "m_metaObject = new PySide::DynamicQMetaObject(className.toAscii(), &"
+ s << INDENT << "m_metaObject = PySide::DynamicQMetaObject::createBasedOn(pySelf->ob_type, &"
<< metaClass->qualifiedCppName() << "::staticMetaObject);" << endl
<< INDENT << "Shiboken::setTypeUserData(reinterpret_cast<Shiboken::SbkBaseWrapper*>(pySelf), m_metaObject, PySide::deleteDynamicQMetaObject);" << endl;
}