summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-20 11:44:09 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-20 14:19:28 -0300
commit4ecf999ebfd00a604de6a8e0859a65f2489263aa (patch)
tree78f588faae2e967063d80934060953bbf1b984f5 /generator
parent20a12c8037e7c44dfac785f8b710682a4af585ca (diff)
downloadshiboken-4ecf999ebfd00a604de6a8e0859a65f2489263aa.tar.gz
shiboken-4ecf999ebfd00a604de6a8e0859a65f2489263aa.tar.xz
shiboken-4ecf999ebfd00a604de6a8e0859a65f2489263aa.zip
Fixed signal register function.
Fixes bug #422. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 48b5e6ca..d3300423 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -3083,20 +3083,14 @@ void CppGenerator::writeSignalInitialization(QTextStream& s, const AbstractMetaC
signature += ", ";
AbstractMetaArgument *a = cppSignal->arguments().at(i);
AbstractMetaType* type = a->type();
- QString cppSignature = translateType(type, metaClass, Generator::ExcludeConst | Generator::ExcludeReference).trimmed();
- QString originalSignature = translateType(type, metaClass, Generator::OriginalName | Generator::ExcludeConst | Generator::ExcludeReference).trimmed();
- if (cppSignature.contains("*"))
- cppSignature = cppSignature.replace("*", "").trimmed();
-
- if (originalSignature.contains("*"))
- originalSignature = originalSignature.replace("*", "").trimmed();
-
+ QString cppSignature = QMetaObject::normalizedType(qPrintable(type->cppSignature()));
+ QString originalSignature = QMetaObject::normalizedType(qPrintable(type->originalTypeDescription()));
if ((cppSignature != originalSignature) && !knowTypes.contains(originalSignature)) {
knowTypes << originalSignature;
s << INDENT << "Shiboken::TypeResolver::createValueTypeResolver<"
<< cppSignature << " >"
- << "(\"" << originalSignature << "\");\n";
+ << "(\"" << originalSignature << "\"); // " << type->cppSignature() << "\n";
}
signature += type->originalTypeDescription();
}