aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-18 06:53:39 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-02 08:10:37 +0100
commitfd7fce388e31174a5179d92b56911d974bf11024 (patch)
treee018b0289b8abe21ee18ca9a0ae72b5f90fe24e8 /src/declarative/qml
parentf4c9823007c6819751c034ecb0110d10f02d4c73 (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')
-rw-r--r--src/declarative/qml/v8/qjsengine.cpp19
-rw-r--r--src/declarative/qml/v8/qjsengine.h1
-rw-r--r--src/declarative/qml/v8/qjsvalue.cpp2
3 files changed, 1 insertions, 21 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
diff --git a/src/declarative/qml/v8/qjsengine.h b/src/declarative/qml/v8/qjsengine.h
index f243fda489..558d5ed024 100644
--- a/src/declarative/qml/v8/qjsengine.h
+++ b/src/declarative/qml/v8/qjsengine.h
@@ -88,7 +88,6 @@ public:
QT_DEPRECATED QJSValue uncaughtException() const;
QT_DEPRECATED void clearExceptions();
- QT_DEPRECATED QJSValue nullValue();
QT_DEPRECATED QJSValue undefinedValue();
#endif
diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp
index ce0d122bad..302c768110 100644
--- a/src/declarative/qml/v8/qjsvalue.cpp
+++ b/src/declarative/qml/v8/qjsvalue.cpp
@@ -237,8 +237,6 @@ bool QJSValue::isNumber() const
/*!
Returns true if this QJSValue is of the primitive type Null;
otherwise returns false.
-
- \sa QJSEngine::nullValue()
*/
bool QJSValue::isNull() const
{