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/qv4sequenceobject.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/qv4sequenceobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 4ec5644352..f864d4dabf 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -81,7 +81,9 @@ static void generateWarning(QV4::ExecutionContext *ctx, const QString& descripti static QV4::Value convertElementToValue(QV4::ExecutionEngine *engine, const QString &element) { - return QV4::Value::fromString(engine, element); + QV4::Value v; + v = engine->newString(element)->asReturnedValue(); + return v; } static QV4::Value convertElementToValue(QV4::ExecutionEngine *, int element) @@ -91,7 +93,9 @@ static QV4::Value convertElementToValue(QV4::ExecutionEngine *, int element) static QV4::Value convertElementToValue(QV4::ExecutionEngine *engine, const QUrl &element) { - return QV4::Value::fromString(engine, element.toString()); + QV4::Value v; + v = engine->newString(element.toString())->asReturnedValue(); + return v; } static QV4::Value convertElementToValue(QV4::ExecutionEngine *, qreal element) |