Mercurial > projects > qtd
diff generator/cppimplgenerator.cpp @ 39:a5cba313c924
network and webkit are wrapped now
author | eldar |
---|---|
date | Sun, 17 May 2009 01:44:06 +0000 |
parents | 8022ef40f110 |
children | a5cc4ada07f5 |
line wrap: on
line diff
--- a/generator/cppimplgenerator.cpp Sat May 16 21:34:54 2009 +0000 +++ b/generator/cppimplgenerator.cpp Sun May 17 01:44:06 2009 +0000 @@ -943,7 +943,7 @@ s << d_name + "_ConcreteWrapper" + QString(d_type->indirections(),'*'); } else - s << translateType(d_type, EnumAsInts); + s << translateType(d_type, EnumAsInts, d_export); } else s << "void*"; @@ -3190,6 +3190,7 @@ cls_name.remove("_ConcreteWrapper"); s << endl + << INDENT << "{" << endl // qtd2 hack, additional scope for avoiding duplicating of "i" << INDENT; switch (type->type()) { @@ -3235,7 +3236,8 @@ s << INDENT << "qtd_assign_" << cls_name << "_array_element(" << java_name << ", i, __java_tmp);" << endl; s << INDENT << "++i;" << endl; } - s << INDENT << "}" << endl; + s << INDENT << "}" << endl + << INDENT << "}" << endl; } else if (type->type() == ContainerTypeEntry::PairContainer) { QList<AbstractMetaType *> args = java_type->instantiations(); @@ -3651,7 +3653,10 @@ || java_type->isTargetLangChar()) { return d_name; } else if (java_type->isArray()) { - return java_type->arrayElementType()->name() + "*"; + if (d_export) + return java_type->arrayElementType()->name() + "*"; + else + return java_type->arrayElementType()->typeEntry()->qualifiedCppName() + "*"; } else if (java_type->isIntegerEnum() || java_type->isIntegerFlags() || ((option & EnumAsInts) && (java_type->isEnum() || java_type->isFlags()))) { return "int";