From: Kent Hansen Date: Wed, 18 Jan 2012 13:36:28 +0000 (+0100) Subject: Remove QJSValue::construct() and deprecated call() overload X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9e7e0c16fc5a84a6af3e8027d48dc167c0e7d583;p=konrad%2Fqtdeclarative.git Remove QJSValue::construct() and deprecated call() overload callAsConstructor() should be used instead. Task-number: QTBUG-23604 Change-Id: If95ab9906712ede7cbae5e9d24624708bccf880f Reviewed-by: Jędrzej Nowacki --- diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp index 08f1ef4..244e6ae 100644 --- a/src/declarative/qml/v8/qjsvalue.cpp +++ b/src/declarative/qml/v8/qjsvalue.cpp @@ -558,30 +558,6 @@ QJSValue QJSValue::callAsConstructor(const QJSValueList &args) /*! \obsolete - Use callWithInstance() instead. -*/ -QJSValue QJSValue::call(const QJSValue& thisObject, const QJSValueList& args) -{ - Q_D(QJSValue); - QScriptIsolate api(d->engine()); - return d->call(QJSValuePrivate::get(thisObject), args); -} - -/*! - \obsolete - - Use callAsConstructor() instead. -*/ -QJSValue QJSValue::construct(const QJSValueList &args) -{ - Q_D(QJSValue); - QScriptIsolate api(d->engine()); - return QJSValuePrivate::get(d->callAsConstructor(args)); -} - -/*! - \obsolete - Returns the QJSEngine that created this QJSValue, or 0 if this QJSValue is invalid or the value is not associated with a particular engine. diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h index 82ceadf..b1c3626 100644 --- a/src/declarative/qml/v8/qjsvalue.h +++ b/src/declarative/qml/v8/qjsvalue.h @@ -113,7 +113,7 @@ public: bool deleteProperty(const QString &name); bool isCallable() const; - QJSValue call(const QJSValueList &args); + QJSValue call(const QJSValueList &args = QJSValueList()); QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &args = QJSValueList()); QJSValue callAsConstructor(const QJSValueList &args = QJSValueList()); @@ -121,10 +121,6 @@ public: QT_DEPRECATED QJSEngine *engine() const; QT_DEPRECATED bool isFunction() const; - - QT_DEPRECATED QJSValue call(const QJSValue &thisObject = QJSValue(), - const QJSValueList &args = QJSValueList()); - QT_DEPRECATED QJSValue construct(const QJSValueList &args = QJSValueList()); #endif private: