From 8209f35b7961b7ea6867d7ebfb5288dcf40ecd71 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 14 Jan 2015 16:22:33 +0100 Subject: Rework QJSValue internals Use a flagged pointer to either store a pointer to a QV4::Value (from the persistent storage) or a pointer to a QVariant in QJSValue::d. Like this we don't need to malloc to create a QJSValue for most use cases. Significantly reduces the memory consumption of QJSValue and speeds it up a lot. Change-Id: I10902cc4b6cc3f43d3f816875dc6c4bbb6b4490f Reviewed-by: Simon Hausmann --- src/imports/statemachine/signaltransition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/statemachine/signaltransition.cpp b/src/imports/statemachine/signaltransition.cpp index 41286d84c8..1b18444358 100644 --- a/src/imports/statemachine/signaltransition.cpp +++ b/src/imports/statemachine/signaltransition.cpp @@ -95,7 +95,7 @@ void SignalTransition::setSignal(const QJSValue &signal) QV4::ExecutionEngine *jsEngine = QV8Engine::getV4(QQmlEngine::contextForObject(this)->engine()); QV4::Scope scope(jsEngine); - QV4::Scoped qobjectSignal(scope, QJSValuePrivate::get(m_signal)->getValue(jsEngine)); + QV4::Scoped qobjectSignal(scope, QJSValuePrivate::convertedToValue(jsEngine, m_signal)); Q_ASSERT(qobjectSignal); QObject *sender = qobjectSignal->object(); -- cgit v1.2.3