diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-05-07 10:09:10 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-05-07 11:51:19 -0300 |
commit | e3f3c1007a435e647eb0ee026559b9a64b44da9e (patch) | |
tree | ca2e3e6cbb681db8f4fb3404d23f325844918b56 | |
parent | 7271b442d9393add8a3da3e66e5462ad553c87c6 (diff) |
Register values types as object types too.
Fixes bug #121.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | cppgenerator.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index de2be43ca..21ec65386 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -2747,10 +2747,12 @@ void CppGenerator::writeClassRegister(QTextStream& s, const AbstractMetaClass* m if (!metaClass->isNamespace()) { bool isObjectType = metaClass->typeEntry()->isObject(); QString typeName = metaClass->qualifiedCppName(); - QString registeredTypeName = typeName + (isObjectType ? "*" : ""); - QString functionSufix = isObjectType ? "Object" : "Value"; - s << INDENT << "Shiboken::TypeResolver::create" << functionSufix; - s << "TypeResolver<" << typeName << " >" << "(\"" << registeredTypeName << "\");\n"; + if (!isObjectType) + s << INDENT << "Shiboken::TypeResolver::createValueTypeResolver<" << typeName << " >" << "(\"" << typeName << "\");\n"; + + s << INDENT << "Shiboken::TypeResolver::createObjectTypeResolver<" << typeName << " >" << "(\"" << typeName << "*\");\n"; + + QString functionSufix = (isObjectType ? "Object" : "Value"); s << INDENT << "Shiboken::TypeResolver::create" << functionSufix; s << "TypeResolver<" << typeName << " >" << "(typeid(" << typeName << ").name());\n"; } |