Showing the changes to libraries/script-engine/src/qtscript/ScriptObjectQtProxy.cpp (1 of 35 files). Show all
Unified · Split
| @@ -77,6 +77,10 @@ QScriptValue ScriptObjectQtProxy::newQObject(ScriptEngineQtScript* engine, QObje · 76 unmodified lines | |||
| 77 | case ScriptEngine::AutoOwnership: | 77 | case ScriptEngine::AutoOwnership: |
| 78 | ownsObject = !object->parent(); | 78 | ownsObject = !object->parent(); |
| 79 | break; | 79 | break; |
| 80 | default: | ||
| 81 | ownsObject = false; | ||
| 82 | qCritical() << "Wrong ScriptEngine::ValueOwnership value: " << ownership; | ||
| 83 | break; | ||
| 80 | } | 84 | } |
| 81 | 85 | ||
| 82 | // create the wrapper | 86 | // create the wrapper |
| @@ -312,7 +316,6 @@ QScriptValue ScriptObjectQtProxy::property(const QScriptValue& object, const QSc · 229 unmodified lines | |||
| 312 | int propId = id & ~TYPE_MASK; | 316 | int propId = id & ~TYPE_MASK; |
| 313 | PropertyDefMap::const_iterator lookup = _props.find(propId); | 317 | PropertyDefMap::const_iterator lookup = _props.find(propId); |
| 314 | if (lookup == _props.cend()) return QScriptValue(); | 318 | if (lookup == _props.cend()) return QScriptValue(); |
| 315 | const PropertyDef& propDef = lookup.value(); | ||
| 316 | 319 | ||
| 317 | QMetaProperty prop = metaObject->property(propId); | 320 | QMetaProperty prop = metaObject->property(propId); |
| 318 | ScriptValue scriptThis = ScriptValue(new ScriptValueQtWrapper(_engine, object)); | 321 | ScriptValue scriptThis = ScriptValue(new ScriptValueQtWrapper(_engine, object)); |