diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-28 13:33:50 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-29 09:20:12 +0200 |
commit | a3a73c6cafbe28068afb60ebe41eb2b6cdfacd36 (patch) | |
tree | 6599ced8c3d992341148a585e5828efaa072e7d4 /src/qml | |
parent | eeb43b3aff1ae100bbe31f4892fe5a8cec8a3a86 (diff) |
Remove some leftovers from the v8bindings
The shared context concept was only used there, so remove
code that was referring to it.
Change-Id: I5ae56049a83818c898ef1cc4e68a5333a9374656
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 3 | ||||
-rw-r--r-- | src/qml/qml/qqmlexpression.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 14 | ||||
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression_p.h | 12 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8contextwrapper.cpp | 15 |
7 files changed, 5 insertions, 43 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 761636a1aa..9688f7193a 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -211,7 +211,6 @@ void QQmlBoundSignalExpression::evaluate(void **a) return; // could not evaluate function. Not valid. } - setUseSharedContext(false); m_expressionFunctionValid = true; } diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 192afe2049..e8dd42cafe 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -506,7 +506,7 @@ the same object as is returned from the Qt.include() call. QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) : propertyCapture(0), rootContext(0), isDebugging(false), - outputWarningsToStdErr(true), sharedContext(0), sharedScope(0), + outputWarningsToStdErr(true), cleanup(0), erroredBindings(0), inProgressCreations(0), workerScriptEngine(0), activeVME(0), networkAccessManager(0), networkAccessManagerFactory(0), diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 091c08e624..39927c7aa0 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -144,9 +144,6 @@ public: bool outputWarningsToStdErr; - QQmlContextData *sharedContext; - QObject *sharedScope; - // Registered cleanup handlers QQmlCleanup *cleanup; diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp index ab22fe6134..da66477a03 100644 --- a/src/qml/qml/qqmlexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -264,7 +264,6 @@ QV4::Value QQmlExpressionPrivate::v4value(bool *isUndefined) { if (!expressionFunctionValid) { function = qmlBinding(context(), scopeObject(), expression, url, line, &qmlscope); - setUseSharedContext(false); expressionFunctionValid = true; } diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index a44ce540c2..81d5f237b5 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -149,19 +149,10 @@ QQmlJavaScriptExpression::evaluate(QQmlContextData *context, QQmlContextData *lastSharedContext = 0; QObject *lastSharedScope = 0; - bool sharedContext = useSharedContext(); - // All code that follows must check with watcher before it accesses data members // incase we have been deleted. DeleteWatcher watcher(this); - if (sharedContext) { - lastSharedContext = ep->sharedContext; - lastSharedScope = ep->sharedScope; - ep->sharedContext = context; - ep->sharedScope = scopeObject(); - } - QV4::Value result; QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine()); QV4::ExecutionContext *ctx = v4->current; @@ -193,11 +184,6 @@ QQmlJavaScriptExpression::evaluate(QQmlContextData *context, } } - if (sharedContext) { - ep->sharedContext = lastSharedContext; - ep->sharedScope = lastSharedScope; - } - if (capture.errorString) { for (int ii = 0; ii < capture.errorString->count(); ++ii) qWarning("%s", qPrintable(capture.errorString->at(ii))); diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h index 0b93087f97..dcd19abb16 100644 --- a/src/qml/qml/qqmljavascriptexpression_p.h +++ b/src/qml/qml/qqmljavascriptexpression_p.h @@ -117,8 +117,6 @@ public: inline bool requiresThisObject() const; inline void setRequiresThisObject(bool v); - inline bool useSharedContext() const; - inline void setUseSharedContext(bool v); inline bool notifyOnValueChanged() const; void setNotifyOnValueChanged(bool v); @@ -226,16 +224,6 @@ void QQmlJavaScriptExpression::setRequiresThisObject(bool v) m_scopeObject.setFlagValue(v); } -bool QQmlJavaScriptExpression::useSharedContext() const -{ - return activeGuards.flag2(); -} - -void QQmlJavaScriptExpression::setUseSharedContext(bool v) -{ - activeGuards.setFlag2Value(v); -} - bool QQmlJavaScriptExpression::notifyOnValueChanged() const { return activeGuards.flag(); diff --git a/src/qml/qml/v8/qv8contextwrapper.cpp b/src/qml/qml/v8/qv8contextwrapper.cpp index fec736b777..643dd79d2e 100644 --- a/src/qml/qml/v8/qv8contextwrapper.cpp +++ b/src/qml/qml/v8/qv8contextwrapper.cpp @@ -65,11 +65,10 @@ public: inline QQmlContextData *getContext() const; inline QObject *getScopeObject() const; - quint32 isSharedContext:1; quint32 hasSubContexts:1; quint32 readOnly:1; quint32 ownsContext:1; - quint32 dummy:28; + quint32 dummy:29; // This is a pretty horrible hack, and an abuse of external strings. When we create a // sub-context (a context created by a Qt.include() in an external javascript file), @@ -92,8 +91,8 @@ private: }; QV8ContextResource::QV8ContextResource(QV8Engine *engine, QQmlContextData *context, QObject *scopeObject, bool ownsContext) -: QV8ObjectResource(engine), isSharedContext(false), hasSubContexts(false), readOnly(true), - ownsContext(ownsContext), context(context), scopeObject(scopeObject) +: QV8ObjectResource(engine), hasSubContexts(false), readOnly(true), + ownsContext(ownsContext), dummy(0), context(context), scopeObject(scopeObject) { } @@ -106,18 +105,12 @@ QV8ContextResource::~QV8ContextResource() // Returns the scope object QObject *QV8ContextResource::getScopeObject() const { - if (isSharedContext) - return QQmlEnginePrivate::get(engine->engine())->sharedScope; - else - return scopeObject; + return scopeObject; } // Returns the context, including resolving a subcontext QQmlContextData *QV8ContextResource::getContext() const { - if (isSharedContext) - return QQmlEnginePrivate::get(engine->engine())->sharedContext; - if (!hasSubContexts) return context; |