# HG changeset patch
# User eldar
# Date 1242330774 0
# Node ID deb0cc1d053d204b6d1d182935717f50f39bd59e
# Parent d54443f1ce1e634a0921a4e95f6a3a9ef3d18a86
fix for QByteArray.at
diff -r d54443f1ce1e -r deb0cc1d053d generator/cppimplgenerator.cpp
--- a/generator/cppimplgenerator.cpp Thu May 14 18:20:24 2009 +0000
+++ b/generator/cppimplgenerator.cpp Thu May 14 19:52:54 2009 +0000
@@ -264,14 +264,19 @@
QString CppImplGenerator::jniReturnName(const AbstractMetaFunction *java_function, uint options, bool d_export)
{
- QString return_type = translateType(java_function->type(), EnumAsInts, d_export);
+ AbstractMetaType *f_type = java_function->type();
+
+ QString return_type = translateType(f_type, EnumAsInts, d_export);
QString new_return_type = java_function->typeReplaced(0);
if (!new_return_type.isEmpty()) {
- return_type = jniName(new_return_type);
+ if(f_type && f_type->isPrimitive()) {
+ if (d_export)
+ return_type = new_return_type;
+ } else
+ return_type = jniName(new_return_type);
}
// qtd
- AbstractMetaType *f_type = java_function->type();
if (f_type) {
if (f_type->name() == "QModelIndex")
return_type = "void";
diff -r d54443f1ce1e -r deb0cc1d053d generator/typesystem_core.xml
--- a/generator/typesystem_core.xml Thu May 14 18:20:24 2009 +0000
+++ b/generator/typesystem_core.xml Thu May 14 19:52:54 2009 +0000
@@ -1183,7 +1183,13 @@
-
+
+
+
+
+
+
+