diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-09 14:33:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-12 21:52:00 +0200 |
commit | a723c7ae756ba567c2f818bb77a83c24373d3438 (patch) | |
tree | 0508a1c1526e56a7aa3c4a3055c8a4b65a973b06 /src/qml/jsruntime/qv4sequenceobject.cpp | |
parent | bf22c55036f6429ccfc849ea71f33e757fae47fa (diff) |
Use a ReturnedValue when converting to String or Object
Also rename Value::toQString() to Value::toQStringNoThrow(),
and add a throwing toQString() method for JS use.
Change-Id: I821b33fc61abb7d08839df965fd337685f61a545
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 29ca34910c..d07277aa5d 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -136,7 +136,7 @@ template <typename ElementType> ElementType convertValueToElement(const QV4::Val template <> QString convertValueToElement(const QV4::Value &value) { - return value.toQString(); + return value.toQStringNoThrow(); } template <> int convertValueToElement(const QV4::Value &value) @@ -146,7 +146,7 @@ template <> int convertValueToElement(const QV4::Value &value) template <> QUrl convertValueToElement(const QV4::Value &value) { - return QUrl(value.toQString()); + return QUrl(value.toQStringNoThrow()); } template <> qreal convertValueToElement(const QV4::Value &value) |