diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-01-16 15:13:51 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-01 08:37:49 +0100 |
commit | 422e2998364d6aae14e65823b315c5e2ae529a62 (patch) | |
tree | f7f721bf46684de287b7b3bac3859638444a0673 /src/declarative | |
parent | 24bf48e3dd305dbc4fdcae5f8751792835ffd46a (diff) |
Remove QJSValue::toUInt16() function
Rationale: Remnant from QtScript. The implementation is just zeroing
the upper 16 bits of the 32-bit integer conversion.
Task-number: QTBUG-23604
Change-Id: I6b4b40883da01713d2a946eb028264f3a351276b
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/v8/qjsvalue.cpp | 21 | ||||
-rw-r--r-- | src/declarative/qml/v8/qjsvalue.h | 1 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp index 9fe9bb38e8..389d425079 100644 --- a/src/declarative/qml/v8/qjsvalue.cpp +++ b/src/declarative/qml/v8/qjsvalue.cpp @@ -541,7 +541,7 @@ QString QJSValue::toString() const attempt to convert the object to a primitive value (possibly resulting in an uncaught script exception). - \sa isNumber(), toInt(), toUInt(), toUInt16() + \sa isNumber(), toInt(), toUInt() */ double QJSValue::toNumber() const { @@ -633,25 +633,6 @@ quint32 QJSValue::toUInt32() const return d->toUInt32(); } -/*! - Returns the unsigned 16-bit integer value of this QJSValue, using - the conversion rules described in \l{ECMA-262} section 9.7, "ToUint16". - - Note that if this QJSValue is an object, calling this function - has side effects on the script engine, since the engine will call - the object's valueOf() function (and possibly toString()) in an - attempt to convert the object to a primitive value (possibly - resulting in an uncaught script exception). - - \sa toNumber() -*/ -quint16 QJSValue::toUInt16() const -{ - Q_D(const QJSValue); - QScriptIsolate api(d->engine()); - return d->toUInt16(); -} - #endif // QT_DEPRECATED /*! diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h index 84fe64d051..370ae53053 100644 --- a/src/declarative/qml/v8/qjsvalue.h +++ b/src/declarative/qml/v8/qjsvalue.h @@ -142,7 +142,6 @@ public: QT_DEPRECATED bool isFunction() const; QT_DEPRECATED qint32 toInt32() const; QT_DEPRECATED quint32 toUInt32() const; - QT_DEPRECATED quint16 toUInt16() const; QT_DEPRECATED QRegExp toRegExp() const; QT_DEPRECATED bool instanceOf(const QJSValue &other) const; |