Browse Source

fix ambigious cast

master
Skycoder42 6 years ago
parent
commit
eb0f28539c
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 2
      src/mvvmcore/androidsettingsaccessor.cpp

2
src/mvvmcore/androidsettingsaccessor.cpp

@ -206,7 +206,7 @@ QVariant AndroidSettingsAccessorPrivate::convertFromJava(const QAndroidJniObject
if(env->IsInstanceOf(object.object(), intClass.object<jclass>())) if(env->IsInstanceOf(object.object(), intClass.object<jclass>()))
return object.callMethod<jint>("intValue","()I"); return object.callMethod<jint>("intValue","()I");
else if(env->IsInstanceOf(object.object(), longClass.object<jclass>())) else if(env->IsInstanceOf(object.object(), longClass.object<jclass>()))
return object.callMethod<jlong>("longValue","()J"); return static_cast<qlonglong>(object.callMethod<jlong>("longValue","()J"));
else if(env->IsInstanceOf(object.object(), floatClass.object<jclass>())) else if(env->IsInstanceOf(object.object(), floatClass.object<jclass>()))
return object.callMethod<jfloat>("floatValue","()F"); return object.callMethod<jfloat>("floatValue","()F");
else if(env->IsInstanceOf(object.object(), boolClass.object<jclass>())) else if(env->IsInstanceOf(object.object(), boolClass.object<jclass>()))

Loading…
Cancel
Save