Showing the changes to libraries/script-engine/src/v8/ScriptEngineV8_cast.cpp (1 of 9 files). Show all
Unified · Split
| @@ -750,6 +750,7 @@ V8ScriptValue ScriptEngineV8::castVariantToValue(const QVariant& val) { · 749 unmodified lines | ||
| 750 | 750 | case QMetaType::QObjectStar: { |
| 751 | 751 | QObject* obj = val.value<QObject*>(); |
| 752 | 752 | if (obj == nullptr) return V8ScriptValue(this, v8::Null(_v8Isolate)); |
| 753 | + //V8TODO: what should be the ownership in this case? | |
| 753 | 754 | return ScriptObjectV8Proxy::newQObject(this, obj); |
| 754 | 755 | } |
| 755 | 756 | case QMetaType::QDateTime: |
| @@ -768,9 +769,10 @@ V8ScriptValue ScriptEngineV8::castVariantToValue(const QVariant& val) { · 12 unmodified lines | ||
| 768 | 769 | if (QMetaType::typeFlags(valTypeId) & (QMetaType::PointerToQObject | QMetaType::TrackingPointerToQObject)) { |
| 769 | 770 | QObject* obj = val.value<QObject*>(); |
| 770 | 771 | if (obj == nullptr) return V8ScriptValue(this, v8::Null(_v8Isolate)); |
| 772 | + //V8TODO: what should be the ownership in this case? | |
| 771 | 773 | return ScriptObjectV8Proxy::newQObject(this, obj); |
| 772 | 774 | } |
| 773 | − // have we set a prototype'd variant? | |
| 775 | + // have we set a prototyped variant? | |
| 774 | 776 | { |
| 775 | 777 | _customTypeProtect.lockForRead(); |
| 776 | 778 | CustomPrototypeMap::const_iterator lookup = _customPrototypes.find(valTypeId); |