From 61f218b4e772c1d97e32ef8031de0043473ebbef Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 10 Apr 2015 15:17:36 +0200 Subject: Speed up object creation Avoid copying url and file name twice into the context every time we instantiate an object. Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlcontextwrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlcontextwrapper.cpp') diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 7aca9ad6c2..b2d03bc188 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -82,7 +82,8 @@ ReturnedValue QmlContextWrapper::urlScope(ExecutionEngine *v4, const QUrl &url) Scope scope(v4); QQmlContextData *context = new QQmlContextData; - context->url = url; + context->baseUrl = url; + context->baseUrlString = url.toString(); context->isInternal = true; context->isJSContext = true; -- cgit v1.2.3