diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-14 16:22:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-21 18:22:52 +0100 |
commit | 8209f35b7961b7ea6867d7ebfb5288dcf40ecd71 (patch) | |
tree | f9e8b5083788574b75d7dba7f4ca1c60eded86fe /src/imports | |
parent | d8131513b07d3f0a6d749c9961b294fc955fed6d (diff) |
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/statemachine/signaltransition.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QV4::QObjectMethod> qobjectSignal(scope, QJSValuePrivate::get(m_signal)->getValue(jsEngine)); + QV4::Scoped<QV4::QObjectMethod> qobjectSignal(scope, QJSValuePrivate::convertedToValue(jsEngine, m_signal)); Q_ASSERT(qobjectSignal); QObject *sender = qobjectSignal->object(); |