Mercurial > projects > qtd
comparison generator/cppimplgenerator.cpp @ 20:deb0cc1d053d
fix for QByteArray.at
author | eldar |
---|---|
date | Thu, 14 May 2009 19:52:54 +0000 |
parents | e78566595089 |
children | e747af2e6b46 |
comparison
equal
deleted
inserted
replaced
19:d54443f1ce1e | 20:deb0cc1d053d |
---|---|
262 return "void *"; | 262 return "void *"; |
263 } | 263 } |
264 | 264 |
265 QString CppImplGenerator::jniReturnName(const AbstractMetaFunction *java_function, uint options, bool d_export) | 265 QString CppImplGenerator::jniReturnName(const AbstractMetaFunction *java_function, uint options, bool d_export) |
266 { | 266 { |
267 QString return_type = translateType(java_function->type(), EnumAsInts, d_export); | 267 AbstractMetaType *f_type = java_function->type(); |
268 | |
269 QString return_type = translateType(f_type, EnumAsInts, d_export); | |
268 QString new_return_type = java_function->typeReplaced(0); | 270 QString new_return_type = java_function->typeReplaced(0); |
269 if (!new_return_type.isEmpty()) { | 271 if (!new_return_type.isEmpty()) { |
270 return_type = jniName(new_return_type); | 272 if(f_type && f_type->isPrimitive()) { |
273 if (d_export) | |
274 return_type = new_return_type; | |
275 } else | |
276 return_type = jniName(new_return_type); | |
271 } | 277 } |
272 | 278 |
273 // qtd | 279 // qtd |
274 AbstractMetaType *f_type = java_function->type(); | |
275 if (f_type) { | 280 if (f_type) { |
276 if (f_type->name() == "QModelIndex") | 281 if (f_type->name() == "QModelIndex") |
277 return_type = "void"; | 282 return_type = "void"; |
278 else if (f_type->typeEntry()->isStructInD()) | 283 else if (f_type->typeEntry()->isStructInD()) |
279 return_type = f_type->typeEntry()->qualifiedCppName(); | 284 return_type = f_type->typeEntry()->qualifiedCppName(); |