Showing the changes to libraries/script-engine/src/qtscript/ScriptObjectQtProxy.cpp (1 of 5 files). Show all
Unified · Split
| @@ -61,7 +61,7 @@ QScriptValue ScriptObjectQtProxy::newQObject(ScriptEngineQtScript* engine, QObje · 60 unmodified lines | ||
| 61 | 61 | ScriptEngineQtScript::ObjectWrapperMap::const_iterator lookup = engine->_qobjectWrapperMap.find(object); |
| 62 | 62 | if (lookup != engine->_qobjectWrapperMap.end()) { |
| 63 | 63 | QSharedPointer<ScriptObjectQtProxy> proxy = lookup.value().lock(); |
| 64 | − if (proxy) return static_cast<QScriptEngine*>(engine)->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy)));; | |
| 64 | + if (proxy) return qengine->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy)));; | |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| @@ -88,7 +88,7 @@ QScriptValue ScriptObjectQtProxy::newQObject(ScriptEngineQtScript* engine, QObje · 20 unmodified lines | ||
| 88 | 88 | ScriptEngineQtScript::ObjectWrapperMap::const_iterator lookup = engine->_qobjectWrapperMap.find(object); |
| 89 | 89 | if (lookup != engine->_qobjectWrapperMap.end()) { |
| 90 | 90 | QSharedPointer<ScriptObjectQtProxy> proxy = lookup.value().lock(); |
| 91 | − if (proxy) return static_cast<QScriptEngine*>(engine)->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy)));; | |
| 91 | + if (proxy) return qengine->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy)));; | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // register the wrapper with the engine and make sure it cleans itself up |
| @@ -104,7 +104,7 @@ QScriptValue ScriptObjectQtProxy::newQObject(ScriptEngineQtScript* engine, QObje · 9 unmodified lines | ||
| 104 | 104 | }); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | − return static_cast<QScriptEngine*>(engine)->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy))); | |
| 107 | + return qengine->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy))); | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | ScriptObjectQtProxy* ScriptObjectQtProxy::unwrapProxy(const QScriptValue& val) { |
| @@ -385,7 +385,7 @@ QScriptValue ScriptVariantQtProxy::newVariant(ScriptEngineQtScript* engine, cons · 274 unmodified lines | ||
| 385 | 385 | return qengine->newVariant(variant); |
| 386 | 386 | } |
| 387 | 387 | auto proxy = QSharedPointer<ScriptVariantQtProxy>::create(engine, variant, proto, protoProxy); |
| 388 | − return static_cast<QScriptEngine*>(engine)->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy))); | |
| 388 | + return qengine->newObject(proxy.get(), qengine->newVariant(QVariant::fromValue(proxy))); | |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | ScriptVariantQtProxy* ScriptVariantQtProxy::unwrapProxy(const QScriptValue& val) { |