Merge pull request #935 from HifiExperiments/jointName

conversionPenaltyScore should accumulate
This commit is contained in:
HifiExperiments 2024-04-18 12:56:34 -07:00 committed by GitHub
commit 376cd078e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1040,7 +1040,7 @@ void ScriptMethodV8Proxy::call(const v8::FunctionCallbackInfo<v8::Value>& argume
} else {
qVarArgLists[i].append(varArgVal);
const QVariant& converted = qVarArgLists[i].back();
conversionPenaltyScore = _engine->computeCastPenalty(V8ScriptValue(_engine, argVal), methodArgTypeId);
conversionPenaltyScore += _engine->computeCastPenalty(V8ScriptValue(_engine, argVal), methodArgTypeId);
// a lot of type conversion assistance thanks to https://stackoverflow.com/questions/28457819/qt-invoke-method-with-qvariant
// A const_cast is needed because calling data() would detach the QVariant.