aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-16 10:22:04 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 06:32:52 +0000
commitf8a104432051d182dfc880cea0d4931fcd229204 (patch)
tree9fba24ebf929a85f624f0e0ec6d862307174c40d
parent4ee9c09a0b6f4e2cdf67ee9d87186691f3e1c0f9 (diff)
Rename the v4function member variables
Name the functions consistently between all classes inheriting from QQmlJavascriptExpression to prepare the move of the member into the base class. Change-Id: I161e829e3921816e675b73b6c1f3ca06315b328f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--src/qml/qml/qqmlbinding.cpp20
-rw-r--r--src/qml/qml/qqmlbinding_p.h2
-rw-r--r--src/qml/qml/qqmlexpression.cpp6
-rw-r--r--src/qml/qml/qqmlexpression_p.h2
4 files changed, 15 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 8baebec16c..2110c8a05e 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -63,7 +63,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContext *ctxt)
setScopeObject(obj);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(context()->engine)->v4engine();
- v4function.set(v4, qmlBinding(context(), obj, str, QString(), 0));
+ m_function.set(v4, qmlBinding(context(), obj, str, QString(), 0));
}
QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlContext *ctxt)
@@ -96,10 +96,10 @@ QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlConte
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(context()->engine)->v4engine();
if (runtimeFunction) {
- v4function.set(v4, QV4::QmlBindingWrapper::createQmlCallableForFunction(ctxtdata, scopeObject(), runtimeFunction));
+ m_function.set(v4, QV4::QmlBindingWrapper::createQmlCallableForFunction(ctxtdata, scopeObject(), runtimeFunction));
} else {
QString code = scriptPrivate->script;
- v4function.set(v4, qmlBinding(context(), scopeObject(), code, url, scriptPrivate->lineNumber));
+ m_function.set(v4, qmlBinding(context(), scopeObject(), code, url, scriptPrivate->lineNumber));
}
}
@@ -114,7 +114,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt
setScopeObject(obj);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(context()->engine)->v4engine();
- v4function.set(v4, qmlBinding(ctxt, obj, str, QString(), 0));
+ m_function.set(v4, qmlBinding(ctxt, obj, str, QString(), 0));
}
QQmlBinding::QQmlBinding(const QString &str, QObject *obj,
@@ -131,7 +131,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj,
setScopeObject(obj);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(context()->engine)->v4engine();
- v4function.set(v4, qmlBinding(ctxt, obj, str, url, lineNumber));
+ m_function.set(v4, qmlBinding(ctxt, obj, str, url, lineNumber));
}
QQmlBinding::QQmlBinding(const QV4::Value &functionPtr, QObject *obj, QQmlContextData *ctxt)
@@ -144,7 +144,7 @@ QQmlBinding::QQmlBinding(const QV4::Value &functionPtr, QObject *obj, QQmlContex
QQmlJavaScriptExpression::setContext(ctxt);
setScopeObject(obj);
- v4function.set(functionPtr.as<QV4::Object>()->engine(), functionPtr);
+ m_function.set(functionPtr.as<QV4::Object>()->engine(), functionPtr);
}
QQmlBinding::~QQmlBinding()
@@ -167,7 +167,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine);
QV4::Scope scope(ep->v4engine());
- QV4::ScopedFunctionObject f(scope, v4function.value());
+ QV4::ScopedFunctionObject f(scope, m_function.value());
Q_ASSERT(f);
if (!updatingFlag()) {
@@ -230,7 +230,7 @@ QVariant QQmlBinding::evaluate()
bool isUndefined = false;
- QV4::ScopedValue f(scope, v4function.value());
+ QV4::ScopedValue f(scope, m_function.value());
QV4::ScopedValue result(scope, QQmlJavaScriptExpression::evaluate(f, &isUndefined));
ep->dereferenceScarceResources();
@@ -242,7 +242,7 @@ QString QQmlBinding::expressionIdentifier()
{
QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine);
QV4::Scope scope(ep->v4engine());
- QV4::ScopedValue f(scope, v4function.value());
+ QV4::ScopedValue f(scope, m_function.value());
QV4::Function *function = f->as<QV4::FunctionObject>()->function();
QString url = function->sourceFile();
@@ -274,7 +274,7 @@ void QQmlBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags)
QString QQmlBinding::expression() const
{
QV4::Scope scope(QQmlEnginePrivate::get(context()->engine)->v4engine());
- QV4::ScopedValue v(scope, v4function.value());
+ QV4::ScopedValue v(scope, m_function.value());
return v->toQStringNoThrow();
}
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index e48c0d4066..c11f3255d2 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -102,7 +102,7 @@ protected:
~QQmlBinding();
private:
- QV4::PersistentValue v4function;
+ QV4::PersistentValue m_function;
inline bool updatingFlag() const;
inline void setUpdatingFlag(bool);
diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
index b9843cabed..e6fbbd491d 100644
--- a/src/qml/qml/qqmlexpression.cpp
+++ b/src/qml/qml/qqmlexpression.cpp
@@ -69,7 +69,7 @@ void QQmlExpressionPrivate::init(QQmlContextData *ctxt, QV4::Function *runtimeFu
{
expressionFunctionValid = true;
QV4::ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(ctxt->engine);
- function.set(engine, QV4::QmlBindingWrapper::createQmlCallableForFunction(ctxt, me, runtimeFunction));
+ m_function.set(engine, QV4::QmlBindingWrapper::createQmlCallableForFunction(ctxt, me, runtimeFunction));
QQmlJavaScriptExpression::setContext(ctxt);
setScopeObject(me);
@@ -246,12 +246,12 @@ QV4::ReturnedValue QQmlExpressionPrivate::v4value(bool *isUndefined)
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(q->engine())->v4engine();
if (!expressionFunctionValid) {
- function.set(v4, qmlBinding(context(), scopeObject(), expression, url, line, &qmlscope));
+ m_function.set(v4, qmlBinding(context(), scopeObject(), expression, url, line, &qmlscope));
expressionFunctionValid = true;
}
QV4::Scope scope(v4);
- QV4::ScopedValue f(scope, function.value());
+ QV4::ScopedValue f(scope, m_function.value());
return evaluate(f, isUndefined);
}
diff --git a/src/qml/qml/qqmlexpression_p.h b/src/qml/qml/qqmlexpression_p.h
index f7fb7cb7c3..e179fe35b9 100644
--- a/src/qml/qml/qqmlexpression_p.h
+++ b/src/qml/qml/qqmlexpression_p.h
@@ -87,7 +87,7 @@ public:
QString expression;
QV4::PersistentValue qmlscope;
- QV4::PersistentValue function;
+ QV4::PersistentValue m_function;
QString url; // This is a QString for a reason. QUrls are slooooooow...
quint16 line;