aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontextwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-14 16:22:33 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-21 18:22:52 +0100
commit8209f35b7961b7ea6867d7ebfb5288dcf40ecd71 (patch)
treef9e8b5083788574b75d7dba7f4ca1c60eded86fe /src/qml/qml/qqmlcontextwrapper.cpp
parentd8131513b07d3f0a6d749c9961b294fc955fed6d (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/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 0c16ae18db..29f5152f77 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -416,7 +416,7 @@ ReturnedValue QmlContextWrapper::qmlSingletonWrapper(ExecutionEngine *v4, String
if (QObject *qobjectSingleton = siinfo->qobjectApi(e))
return QV4::QObjectWrapper::wrap(engine(), qobjectSingleton);
- return QJSValuePrivate::get(siinfo->scriptApi(e))->getValue(engine());
+ return QJSValuePrivate::convertedToValue(engine(), siinfo->scriptApi(e));
}
DEFINE_OBJECT_VTABLE(QQmlIdObjectsArray);