| 2046 | } |
| 2047 | |
| 2048 | bool QtJambiAPI::convertJavaToNative(JNIEnv *env, jobject java_object, void * output, const std::type_info& typeId) |
| 2049 | { |
| 2050 | QtJambiTypeEntryPtr typeEntry; |
| 2051 | const std::type_info* typeIdPtr = &typeId; |
| 2052 | if(typeIdPtr) |
| 2053 | typeEntry = QtJambiTypeEntry::getTypeEntry(env, typeId); |
| 2054 | if(java_object && typeEntry && typeEntry->isFunctional() && !env->IsInstanceOf(java_object, typeEntry->javaClass())){ |
| 2055 | QByteArray qtName = QtJambiTypeManager::getInternalTypeName(env, env->GetObjectClass(java_object), true); |
| 2056 | if(!qtName.isEmpty()){ |
| 2057 | try{ |
| 2058 | QtJambiTypeEntryPtr _typeEntry = QtJambiTypeEntry::getTypeEntry(env, typeId, qtName); |
| 2059 | if(_typeEntry && _typeEntry->isFunctional()) |
| 2060 | typeEntry = _typeEntry; |
| 2061 | }catch(...){} |
| 2062 | } |
| 2063 | } |
| 2064 | if(typeEntry){ |
| 2065 | return typeEntry->convertToNative(env, java_object, output); |
| 2066 | }else return false; |
| 2067 | } |
| 2068 | |
| 2069 | bool QtJambiAPI::convertJavaToNative(JNIEnv *env, jobject java_object, void * output, QtJambiScope& scope, const std::type_info& typeId) |
| 2070 | { |
nothing calls this directly
no test coverage detected