mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 09:09:53 +02:00
Reverted change that broke AnimationObjec scripting interface
This commit is contained in:
parent
3be4fdc33d
commit
4e91765a3f
1 changed files with 2 additions and 3 deletions
|
@ -755,9 +755,8 @@ V8ScriptValue ScriptEngineV8::castVariantToValue(const QVariant& val) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
// check to see if this is a pointer to a QObject-derived object
|
// check to see if this is a pointer to a QObject-derived object
|
||||||
// V8TODO: I added WeakPointerToQObject and SharedPointerToQObject here, but maybe they need different object ownership?
|
// V8TODO: WeakPointerToQObject and SharedPointerToQObject were causing trouble here because some values are handled by custom prototypes instead
|
||||||
if (QMetaType::typeFlags(valTypeId) & (QMetaType::PointerToQObject | QMetaType::TrackingPointerToQObject
|
if (QMetaType::typeFlags(valTypeId) & (QMetaType::PointerToQObject | QMetaType::TrackingPointerToQObject)) {
|
||||||
| QMetaType::WeakPointerToQObject | QMetaType::SharedPointerToQObject)) {
|
|
||||||
QObject* obj = val.value<QObject*>();
|
QObject* obj = val.value<QObject*>();
|
||||||
if (obj == nullptr) return V8ScriptValue(this, v8::Null(_v8Isolate));
|
if (obj == nullptr) return V8ScriptValue(this, v8::Null(_v8Isolate));
|
||||||
return ScriptObjectV8Proxy::newQObject(this, obj);
|
return ScriptObjectV8Proxy::newQObject(this, obj);
|
||||||
|
|
Loading…
Reference in a new issue