diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-01-18 06:53:39 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-02 08:10:37 +0100 |
commit | fd7fce388e31174a5179d92b56911d974bf11024 (patch) | |
tree | e018b0289b8abe21ee18ca9a0ae72b5f90fe24e8 /src/declarative/qml/v8/qjsengine.cpp | |
parent | f4c9823007c6819751c034ecb0110d10f02d4c73 (diff) |
Remove QJSEngine::nullValue() function
Rationale: It's strange to have a null value factory function.
There should just be one way of constructing null values: By
passing NullValue to the QJSValue constructor.
The nullValue() function created a value that was bound to the
engine; the QJSValue constructor does not. In order to ensure that
we're testing the same behavior as before, I've replaced nullValue()
calls by evaluate("null") in the autotests.
Task-number: QTBUG-23604
Change-Id: Ie40b61fa64e070b90c6245fd21554963073c5f80
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qjsengine.cpp')
-rw-r--r-- | src/declarative/qml/v8/qjsengine.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/declarative/qml/v8/qjsengine.cpp b/src/declarative/qml/v8/qjsengine.cpp index 542c20d3d2..b818c18f1c 100644 --- a/src/declarative/qml/v8/qjsengine.cpp +++ b/src/declarative/qml/v8/qjsengine.cpp @@ -314,24 +314,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in /*! \obsolete - Returns a QJSValue of the primitive type Null. - - \sa nullValue() -*/ -QJSValue QJSEngine::nullValue() -{ - Q_D(QJSEngine); - QScriptIsolate api(d, QScriptIsolate::NotNullEngine); - v8::HandleScope handleScope; - return QJSValuePrivate::get(new QJSValuePrivate(d, v8::Null())); -} - -/*! - \obsolete - Returns a QJSValue of the primitive type Undefined. - - \sa nullValue() */ QJSValue QJSEngine::undefinedValue() { @@ -380,7 +363,7 @@ QJSValue QJSEngine::newArray(uint length) Signals and slots, properties and children of \a object are available as properties of the created QJSValue. - If \a object is a null pointer, this function returns nullValue(). + If \a object is a null pointer, this function returns a null value. If a default prototype has been registered for the \a object's class (or its superclass, recursively), the prototype of the new script |