Showing the changes to libraries/script-engine/src/qtscript/ScriptContextQtWrapper.cpp (1 of 49 files). Show all
Unified · Split
| @@ -43,16 +43,16 @@ ScriptValue ScriptContextQtWrapper::callee() const { · 42 unmodified lines | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | ScriptEnginePointer ScriptContextQtWrapper::engine() const { | 45 | ScriptEnginePointer ScriptContextQtWrapper::engine() const { |
| 46 | return _engine->sharedFromThis(); | 46 | return _engine->shared_from_this(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | ScriptFunctionContextPointer ScriptContextQtWrapper::functionContext() const { | 49 | ScriptFunctionContextPointer ScriptContextQtWrapper::functionContext() const { |
| 50 | return ScriptFunctionContextPointer(new ScriptFunctionContextQtWrapper(_context)); | 50 | return std::make_shared<ScriptFunctionContextQtWrapper>(_context); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | ScriptContextPointer ScriptContextQtWrapper::parentContext() const { | 53 | ScriptContextPointer ScriptContextQtWrapper::parentContext() const { |
| 54 | QScriptContext* result = _context->parentContext(); | 54 | QScriptContext* result = _context->parentContext(); |
| 55 | return result ? ScriptContextPointer(new ScriptContextQtWrapper(_engine, result)) : ScriptContextPointer(); | 55 | return result ? std::make_shared<ScriptContextQtWrapper>(_engine, result) : ScriptContextPointer(); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | ScriptValue ScriptContextQtWrapper::thisObject() const { | 58 | ScriptValue ScriptContextQtWrapper::thisObject() const { |