diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-26 12:04:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:46 +0200 |
commit | d2e2a5b59c617e6cf7236cf36e9c20fe9ea36fdb (patch) | |
tree | 1fc21beff4add85e68a61b7c88b5d5f928bec6e8 /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
parent | 18d4794e3f614eec8594f6636d569af8bc112618 (diff) | |
download | qtdeclarative-d2e2a5b59c617e6cf7236cf36e9c20fe9ea36fdb.tar.gz |
Remove Value::fromString()
replaced with call to the GC safe ExceutionEngine::newString()
method.
Change-Id: I7258296e75ca724ff42b94a0d147bc33a05f8f68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 6870cd693c..c206826cbc 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -170,7 +170,7 @@ static QV4::ReturnedValue LoadProperty(QV8Engine *engine, QObject *object, } else if (property.propType == QMetaType::QString) { QString v; ReadFunction(object, property, &v, notifier); - return Value::fromString(v4, v).asReturnedValue(); + return v4->newString(v)->asReturnedValue(); } else if (property.propType == QMetaType::UInt) { uint v = 0; ReadFunction(object, property, &v, notifier); @@ -1680,7 +1680,7 @@ QV4::ReturnedValue QObjectMethod::method_toString(QV4::ExecutionContext *ctx) result = QLatin1String("null"); } - return QV4::Value::fromString(ctx, result).asReturnedValue(); + return ctx->engine->newString(result)->asReturnedValue(); } QV4::ReturnedValue QObjectMethod::method_destroy(QV4::ExecutionContext *ctx, const Value *args, int argc) |