aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qjsengine.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-17 09:49:52 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-01 08:37:49 +0100
commite77ea6f2fa8e98cb4a03144664a31b6070635a63 (patch)
tree9d95dc1efba9bbc62ddb193ba2da04a9144ba033 /src/declarative/qml/v8/qjsengine.cpp
parentbe784e3b15068c0677115ca9500531212584cc7d (diff)
Remove QJSEngine::newVariant() function
Rationale: This is a remnant from QtScript. There is no reason one should be able to explicitly wrap an arbitrary C++ type in a QVariant. toScriptValue() will automatically wrap the type in a QVariant if it's a type that's not specifically handled by the meta-type system, or if it can't usefully/losslessly be converted to a native JavaScript type. Task-number: QTBUG-23604 Change-Id: I5790cd92b9ffd5fcfbee1cd73a8eaa16fc74846f 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.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/declarative/qml/v8/qjsengine.cpp b/src/declarative/qml/v8/qjsengine.cpp
index 5141715749..542c20d3d2 100644
--- a/src/declarative/qml/v8/qjsengine.cpp
+++ b/src/declarative/qml/v8/qjsengine.cpp
@@ -401,30 +401,6 @@ QJSValue QJSEngine::newQObject(QObject *object)
return d->scriptValueFromInternal(d->newQObject(object, QV8Engine::JavaScriptOwnership));
}
-#ifdef QT_DEPRECATED
-
-/*!
- \obsolete
-
- Creates a JavaScript object holding the given variant \a value.
-
- If a default prototype has been registered with the meta type id of
- \a value, then the prototype of the created object will be that
- prototype; otherwise, the prototype will be the Object prototype
- object.
-
- \sa setDefaultPrototype(), QJSValue::toVariant(), reportAdditionalMemoryCost()
-*/
-QJSValue QJSEngine::newVariant(const QVariant &value)
-{
- Q_D(QJSEngine);
- QScriptIsolate api(d, QScriptIsolate::NotNullEngine);
- v8::HandleScope handleScope;
- return d->scriptValueFromInternal(d->newVariant(value));
-}
-
-#endif // QT_DEPRECATED
-
/*!
Returns this engine's Global Object.