aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlbinding.cpp7
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp9
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h4
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp6
4 files changed, 3 insertions, 23 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 32b20149e8..79b1b2efc5 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -121,7 +121,6 @@ QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlConte
if (!ctxt && (!scriptPrivate->context || !scriptPrivate->context->isValid()))
return;
- bool needRewrite = true;
QString code;
int id = scriptPrivate->bindingId;
@@ -133,7 +132,6 @@ QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlConte
Q_ASSERT(typeData);
if (QQmlCompiledData *cdata = typeData->compiledData()) {
- needRewrite = true;
code = cdata->primitives.at(id);
m_url = cdata->name;
}
@@ -150,10 +148,7 @@ QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlConte
m_lineNumber = scriptPrivate->lineNumber;
m_columnNumber = scriptPrivate->columnNumber;
- if (needRewrite)
- v4function = qmlBinding(context(), scopeObject(), code, QString(), m_lineNumber);
- else
- v4function = evalFunction(context(), scopeObject(), code, QString(), m_lineNumber);
+ v4function = qmlBinding(context(), scopeObject(), code, QString(), m_lineNumber);
}
QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt)
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 28abf5fa11..99ab12fcb5 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -308,15 +308,6 @@ void QQmlJavaScriptExpression::exceptionToError(const QV4::Exception &e, QQmlErr
QV4::PersistentValue
QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scope,
- const char *code, int codeLength,
- const QString &filename, quint16 line,
- QV4::PersistentValue *qmlscope)
-{
- return evalFunction(ctxt, scope, QString::fromUtf8(code, codeLength), filename, line, qmlscope);
-}
-
-QV4::PersistentValue
-QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scope,
const QString &code, const QString &filename, quint16 line,
QV4::PersistentValue *qmlscope)
{
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index caf1266415..0b93087f97 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -151,10 +151,6 @@ public:
const QString &code, const QString &filename,
quint16 line,
QV4::PersistentValue *qmlscope = 0);
- static QV4::PersistentValue evalFunction(QQmlContextData *ctxt, QObject *scope,
- const char *code, int codeLength,
- const QString &filename, quint16 line,
- QV4::PersistentValue *qmlscope = 0);
// doesn't require rewriting the expression
static QV4::PersistentValue qmlBinding(QQmlContextData *ctxt, QObject *scope,
const QString &code,
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index cec50ddd5b..ace9ff9a65 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -976,10 +976,8 @@ QV4::Value QQmlVMEMetaObject::method(int index)
// XXX We should evaluate all methods in a single big script block to
// improve the call time between dynamic methods defined on the same
// object
- v8methods[index] = QQmlExpressionPrivate::evalFunction(ctxt, object, body,
- bodyLength,
- ctxt->urlString,
- data->lineNumber);
+ v8methods[index] = QQmlExpressionPrivate::evalFunction(ctxt, object, QString::fromUtf8(body, bodyLength),
+ ctxt->urlString, data->lineNumber);
}
return v8methods[index];